Re: Pango: Issues with illegal characters in family names (encoding problems on Windows?)

Hi Eduard,

It's possible that there are bugs on the fonts.  For the ttf in [6] I cannot spot any from the output of fc-query.  The one in [5] is a Windows .fon font.  It's possible that there's a bug in FreeType driver for that format.

At any rate, I guess the right question you should be asking is, why is Inkscape crashing, and fix that.  Pango, etc, handle invalid UTF-8 just fine for example.


On Fri, May 12, 2017 at 11:44 AM, Eduard Braun <eduard braun2 gmx de> wrote:
Hi all,

I'm a developer in the Inkscape project which uses Pango/Fontconfig to render (and also query) available fonts on the system.

In the past there were multiple bug reports [2,3] about Inkscape crashing due to fonts with illegal characters in their family name (Inkscape queries them with "pango_ft2_font_map_new()" and "pango_font_map_list_families()" respectively and gets the name with "pango_font_family_get_name()", see [3] for details).

I recently pushed a fix [4] which seems to avoid the crashes and proves, that they are caused by font family names containing illegal UTF-8 characters!

The question I'm asking myself is, whether
a) the font files themselves are invalid and contain characters in some broken encoding
b) fontconfig has issues querying fonts with special characters on Windows, or
c) Pango does something wrong when passing the list to Inkscape

As I have not nearly enough knowledge about Pango/Fontconfig (or font formats to start with) I hope that somebody is able to figure out what is going wrong and if it can be fixed somehow!

As a start you can find two fonts that caused crashes in the past at [5] and [6] and according to user reports the fix in [4] prevents them both (while obviously making it impossible to use the font).

Best Regards,
Eduard Braun


gtk-i18n-list mailing list
gtk-i18n-list gnome org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]