https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Bug ID: 1813187 Summary: Cantarell-VF.otf fails on fontconfig's FcPatternGetInteger() call for FC_WEIGHT Product: Fedora Version: 32 Status: NEW Component: abattis-cantarell-fonts Assignee: klember@redhat.com Reporter: zdohnal@redhat.com QA Contact: extras-qa@fedoraproject.org CC: cosimo.cecchi@gmail.com, fonts-bugs@lists.fedoraproject.org, ian@ianweller.org, klember@redhat.com, me@fale.io Target Milestone: --- Classification: Fedora
Description of problem: During investigating https://bugzilla.redhat.com/show_bug.cgi?id=1722900 was found the font mentioned in summary fails with mismatch on FcPatternGetInteger() from fontconfig when gs asks for FC_WEIGHT value. I'm not sure whether the font or fontconfig is at fault, so I'm filing the issue on font package.
I'm willing to help with debug, if needed.
Version-Release number of selected component (if applicable): abattis-cantarell-fonts-0:0.201-2.fc32.noarch fontconfig-2.13.92-6.fc32.x86_64 ghostscript-9.50-1.fc32
Steps to Reproduce: 1. gs -dNODISPLAY -dBATCH nasmdoc.ps
Actual results: You can see in logs a message:
DEBUG: FC_WEIGHT didn't match in /usr/share/fonts/cantarell/Cantarell-VF.otf
Expected results: No such message
Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Kalev Lember klember@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jsteiner@redhat.com, | |tagoh@redhat.com
--- Comment #1 from Kalev Lember klember@redhat.com --- Sorry, I don't know much about fonts and don't think I can be of much help debugging this. Can you ask Jakub and/or Tagoh if they know what's going on (CCd)?
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
--- Comment #2 from Nicolas Mailhot nicolas.mailhot@laposte.net --- On the fontconfig side, that’s basically bug https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/222
No idea if gs also contains problematic weight assumptions, invalidated by the introduction of variable fonts.
On the packaging side cantarell has probably not been converted to new font packaging guidelines yet. It needs some name fixing (use of a space-free ExtraBold qualifier, removal of Regular in Name ID 4 for the Regular face, making NameID 4 consistent with Name ID 17 for other faces). Though except for the ExtraBold part, everything else will going to be workarounded in future fontconfig versions.
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
--- Comment #3 from Nicolas Mailhot nicolas.mailhot@laposte.net --- (Also fontconfig exposes a generic meta face for variable fonts, this face does not have any specific weight, it gives the weight scale for the whole family)
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
--- Comment #4 from Akira TAGOH tagoh@redhat.com --- That isn't related to this.
I don't know how ghostscript collects fonts from fontconfig though (probably using FcFontList()?), the problem here would be that they have dealt with a meta face as a normal face which has true in FC_VARIABLE and contains a weight in range but not integer.
That's not a bug in font nor fontconfig.
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Zdenek Dohnal zdohnal@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(tagoh@redhat.com)
--- Comment #5 from Zdenek Dohnal zdohnal@redhat.com --- Hi Akira,
yes, you're right, gs uses FcFontlist() - does the following to get font list:
----------------------------------------------------- /* load the font set that we'll iterate over */ pat = FcPatternBuild(NULL, FC_OUTLINE, FcTypeBool, 1, FC_SCALABLE, FcTypeBool, 1, NULL); os = FcObjectSetBuild(FC_FILE, FC_OUTLINE, FC_FAMILY, FC_WEIGHT, FC_SLANT, NULL); state->font_list = FcFontList(0, pat, os); -----------------------------------------------------
then when it enumerates the fonts it calls (f.e. for FC_WEIGHT):
result = FcPatternGetInteger (font, FC_WEIGHT, 0, &weight_fc);
(similar thing for FC_FILE, FC_FAMILY, FC_SLANT, FC_OUTLINE).
Would you mind telling me/pointing me to a manual how to deal with it correctly, if it is not a problem of font/fontconfig?
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Akira TAGOH tagoh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(tagoh@redhat.com) |
--- Comment #6 from Akira TAGOH tagoh@redhat.com --- If ghostscript has no plans to support variable fonts or a plan to support only named-instances, you can set false to FC_VARIABLE as a query pattern; that should be more simple and easier than your patch applied in ghostscript; you can take care of the named-instances in VF font files as same as usual face then. otherwise set FcDontCare to FC_VARIABLE and need more changes in the code to deal with non-named-instances perhaps.
The meta face which you faced the issue this time provides such information instead of providing it as one of faces because there are so many patterns to enummerate everything and quite hard to do. the targetted properties such as FC_WEIGHT, FC_WIDTH and FC_SIZE has a value in FcRange which means they can use an unique value between them.
Unfortunately there are no more detailed document though, pango source code may helps how to deal with them.
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
--- Comment #7 from Akira TAGOH tagoh@redhat.com --- You can see what values the meta face provides. try fc-list -b -v Cantarell:variable=true for example.
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Zdenek Dohnal zdohnal@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dkaspar@redhat.com, | |mosvald@redhat.com, | |twaugh@redhat.com, | |zdohnal@redhat.com Component|abattis-cantarell-fonts |ghostscript Assignee|klember@redhat.com |zdohnal@redhat.com Summary|Cantarell-VF.otf fails on |ghostscript does not load |fontconfig's |variable fonts from |FcPatternGetInteger() call |fontconfig |for FC_WEIGHT |
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Zdenek Dohnal zdohnal@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #8 from Zdenek Dohnal zdohnal@redhat.com --- IMO they are not aware of the fact the variable fonts need a special care when are used from fontconfig.
I'll check with upstream about variable fonts then.
Thank you for the info!
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Zdenek Dohnal zdohnal@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1813230
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1813230 [Bug 1813230] [RFE] ghostscript add support for variable fonts from fontconfig
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Zdenek Dohnal zdohnal@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|zdohnal@redhat.com |akhaitov@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Anna Khaitovich akhaitov@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |POST
--- Comment #9 from Anna Khaitovich akhaitov@redhat.com --- ghostscript-9.52 already has a workaround for this issue (see upstream commit - [1]), fix is already prepared and waiting for upstream approval ([2]), so moving this bug to POST.
[1] https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=09a575f0fdc6edde7e42f... [2] https://bugs.ghostscript.com/show_bug.cgi?id=702225
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|akhaitov@redhat.com |akhaitovich@gmail.com
--- Comment #10 from Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org --- This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
--- Comment #11 from Fedora Program Management fedora-pgm@bot.bugzilla.redhat.com --- This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'.
Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|akhaitovich@gmail.com |rlescak@redhat.com
--- Comment #12 from Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org --- This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
https://bugzilla.redhat.com/show_bug.cgi?id=1813187
Ben Cotton bcotton@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|POST |CLOSED Resolution|--- |EOL Last Closed| |2021-05-25 15:47:09
--- Comment #13 from Ben Cotton bcotton@redhat.com --- Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug.
Thank you for reporting this bug and we are sorry it could not be fixed.
fonts-bugs@lists.fedoraproject.org