Summary: | Bitmap fonts (in FON-Format) are rendered as Helvetica-like fonts | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Scit2010 <scl.gplus> |
Component: | conf | Assignee: | fontconfig-bugs |
Status: | RESOLVED MOVED | QA Contact: | Behdad Esfahbod <freedesktop> |
Severity: | normal | ||
Priority: | medium | CC: | akira, freedesktop, mitch |
Version: | 2.9 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Result of fc-query command on one of the affected fonts |
Description
Scit2010
2013-01-16 20:00:48 UTC
Try first if you can see that font with fc-list. if not, possible reason why it's disabled in fontconfig is because it may be missing encoding to map glyphs. you can check that with fc-query if no hexadecimal blocks are shown in charset section. Created attachment 73196 [details]
Result of fc-query command on one of the affected fonts
I tested on Mac OS X, because I have no fontconfig on Windows (GIMP only has a fontconfig DLL).
Results of fc-list:
font is not found. When I copy the font into the /Library/Fonts folder, fc-list finds it. However, it's not rendered correctly in GIMP.
Results of fc-query: see attachment.
(In reply to comment #2) > Created attachment 73196 [details] That explains why this happened. that font seems not containing any information to determine the charset. so fontconfig won't help anything for such fonts. that said, freetype is capable to deal with it so you can still open it with freetype API directly though. Thank you for your answer. The GIMP application uses FontConfig as well as FreeType. However the fonts are rendered wrong. What else can we do? Has that font ever been rendered correctly? I suppose the default behavior is expecting that the font is in Unicode. if that font isn't, I'm not that surprised the rendering is wrong. After some research, I see now FON-format version 3 has a field to determine the charset. so given that that font contains any charset information, there are two steps to render it properly. 1) implement FcFontDecode in fcfreetype.c for that 2) Use FcFreeTypeCharIndex() instead of FT_Get_Char_Index() in applications (in this case in GIMP if not yet) I'm not sure if it's worth doing. if appearing those fonts in the list is the issue, blacklisting it may be easier perhaps. It's certainly not worth to consider such fonts for any kind of advanced typesetting, but bitmap fonts are of course a valid case for artistic purposes, as in every text is also an image. This particularly applies to GIMP. It would be nice if they just worked via fontconfig. Apparently the fonts rendered correctly when GIMP still used freetype directly to render the glyphs. These days we simply say pango_cairo_show_layout(). Is fontconfig at all the right place to report this? maybe since cairo also uses fontconfig to determine. though this is lower priority for me or even wonder if we should support non-Unicode-mapped fonts. The place to fix this is definitely in Fontconfig. mitch, bitmap fonts generally works. It's 'FON' fonts that seem to be at issue here, not all bitmap formats. Akira, in case you want to give it a try, ftwinfnt.h may be a good place to start. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/67. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.