Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1722900
Summary: | ghostscript stops enumerating fonts on the first font which fontconfig returns mismatch for | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | H. Peter Anvin <hpa> | ||||
Component: | ghostscript | Assignee: | Zdenek Dohnal <zdohnal> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 31 | CC: | deekej, tagoh, twaugh, zdohnal | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | ghostscript-9.27-3.fc31 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1812284 (view as bug list) | Environment: | |||||
Last Closed: | 2020-03-18 02:22:07 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1812284, 1813228 | ||||||
Attachments: |
|
Description
H. Peter Anvin
2019-06-21 16:18:48 UTC
Created attachment 1583322 [details]
Test case described in bug report
Hi, thank you for the report! The fix will be in the next update - ghostscript-9.50-1 The issue is quite tricky one - loading fonts from /usr/share/fonts actually works. I created test which installs needed fonts and it passes during testing for old gs version, but, curious enough, there are messages about missing fonts when I run it manually. Output of test: Querying operating system for font files... Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceCodePro-Bold. Can't find (or can't open) font file SourceCodePro-Bold. Loading SourceCodePro-Bold font from /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Bold.otf... 4373016 2751779 3419148 2102168 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceCodePro-Regular. Can't find (or can't open) font file SourceCodePro-Regular. Loading SourceCodePro-Regular font from /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Regular.otf... 4373016 2753334 3780924 2461019 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceCodePro-Semibold. Can't find (or can't open) font file SourceCodePro-Semibold. Loading SourceCodePro-Semibold font from /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Semibold.otf... 4373016 2754915 4143484 2823442 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-Bold. Can't find (or can't open) font file SourceSansPro-Bold. Loading SourceSansPro-Bold font from /usr/share/fonts/source-sans-pro/SourceSansPro-Bold.otf... 4401664 2787229 4713004 3368423 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-BoldIt. Can't find (or can't open) font file SourceSansPro-BoldIt. Loading SourceSansPro-BoldIt font from /usr/share/fonts/source-sans-pro/SourceSansPro-BoldIt.otf... 4401664 2788784 5122556 3780337 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-It. Can't find (or can't open) font file SourceSansPro-It. Loading SourceSansPro-It font from /usr/share/fonts/source-sans-pro/SourceSansPro-It.otf... 4401664 2790334 5530252 4181005 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-Regular. Can't find (or can't open) font file SourceSansPro-Regular. Loading SourceSansPro-Regular font from /usr/share/fonts/source-sans-pro/SourceSansPro-Regular.otf... 4401664 2791889 6056588 4702973 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-Semibold. Can't find (or can't open) font file SourceSansPro-Semibold. Loading SourceSansPro-Semibold font from /usr/share/fonts/source-sans-pro/SourceSansPro-Semibold.otf... 4401664 2793446 6604404 5236666 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-SemiboldIt. Can't find (or can't open) font file SourceSansPro-SemiboldIt. Loading SourceSansPro-SemiboldIt font from /usr/share/fonts/source-sans-pro/SourceSansPro-SemiboldIt.otf... 4401664 2795005 7013172 5642454 1 done. All fonts are loaded from /usr/share/fonts successfully even with old gs! Then I ran it manually: Querying operating system for font files... Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceCodePro-Bold. Can't find (or can't open) font file SourceCodePro-Bold. Loading SourceCodePro-Bold font from /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Bold.otf... 4373016 2748577 3253392 1936940 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceCodePro-Regular. Can't find (or can't open) font file SourceCodePro-Regular. Loading SourceCodePro-Regular font from /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Regular.otf... 4373016 2750132 3615168 2295687 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceCodePro-Semibold. Can't find (or can't open) font file SourceCodePro-Semibold. Loading SourceCodePro-Semibold font from /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Semibold.otf... 4373016 2751713 3977728 2658006 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-Bold. Can't find (or can't open) font file SourceSansPro-Bold. Didn't find this font on the system! Substituting font Helvetica-Bold for SourceSansPro-Bold. Loading NimbusSans-Bold font from /usr/share/ghostscript/Resource/Font/NimbusSans-Bold... 4406360 2899798 3997928 2673171 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-BoldIt. Can't find (or can't open) font file SourceSansPro-BoldIt. Didn't find this font on the system! Substituting font Helvetica-BoldOblique for SourceSansPro-BoldIt. Loading NimbusSans-BoldItalic font from /usr/share/ghostscript/Resource/Font/NimbusSans-BoldItalic... 4472472 3083363 4018128 2685391 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-It. Can't find (or can't open) font file SourceSansPro-It. Didn't find this font on the system! Substituting font Helvetica-Oblique for SourceSansPro-It. Loading NimbusSans-Italic font from /usr/share/ghostscript/Resource/Font/NimbusSans-Italic... 4599184 3274797 4018128 2694157 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-Regular. Can't find (or can't open) font file SourceSansPro-Regular. Didn't find this font on the system! Substituting font Courier for SourceSansPro-Regular. Loading NimbusMonoPS-Regular font from /usr/share/ghostscript/Resource/Font/NimbusMonoPS-Regular... 4847096 3517570 4038328 2706745 1 done. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-Semibold. Can't find (or can't open) font file SourceSansPro-Semibold. Didn't find this font on the system! Substituting font Helvetica-Bold for SourceSansPro-Semibold. Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceSansPro-SemiboldIt. Can't find (or can't open) font file SourceSansPro-SemiboldIt. Didn't find this font on the system! Substituting font Helvetica-BoldOblique for SourceSansPro-SemiboldIt. Some fonts were not loaded now, why? Then I saw the message: .... Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/SourceCodePro-Semibold. Can't find (or can't open) font file SourceCodePro-Semibold. Loading SourceCodePro-Semibold font from /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Semibold.otf... 4373016 2751713 3977728 2658006 1 done. .... What? Successful load from /usr/share/fonts? It seems the problem is not about gs is not able to read fonts from /usr/share/fonts, but it is rather connected to the issue I found yesterday: When fontconfig returns error for one of existing fonts, gs does not continue in loading other fonts. So the issue is rooted in the font/fontconfig, but improper error handling in gs causes no loading of other fonts found by fontconfig. But I'm not sure why fontfonfig returns different value during testing than ran manually. Silly mistake - difference between running in test and running it manually is that font which I put into /usr/share/fonts is cleaned up... In the end, the fix can be backported. Moving to F31, the update will be in the stable repo faster, so the bug will be closed faster. The fix will be for F30 too, but I'm not sure how fast will it be (depends on the number of willing tester on F30). FEDORA-2020-5ba7efcc1c has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5ba7efcc1c ghostscript-9.27-3.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5ba7efcc1c The fix may works as a workaround but it looks like the fixed code stops supporting (a part of) variable fonts. (In reply to Akira TAGOH from comment #9) > The fix may works as a workaround but it looks like the fixed code stops > supporting (a part of) variable fonts. To be precise - it does not stop support of variable fonts since it seems there was no support of them to begin with. As I wrote in #1813187, would you mind helping me how it should be taken care of properly? I don't have much experience in fonts. Or, if you are willing, join me at #ghostscript at irc.freenode.net and talk with upstream about it? I added a comment there. and yes, that's true. that's why I wrote it as "a part of". in fact, currently only named-instances are supported. I can't say more details how to do it because I don't know how ghostscript use those values from FcPattern and render. They may also need to use the proper API from freetype to support variable fonts. see around this https://www.freetype.org/freetype2/docs/reference/ft2-multiple_masters.html#ft_mm_var ghostscript-9.27-3.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report. |