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.

b

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


[1]https://bugs.launchpad.net/inkscape/+bug/1495386
[2]https://bugs.launchpad.net/inkscape/+bug/1508928
[3] http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/libnrtype/FontFactory.cpp
[4] http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15687
[5] https://bugs.launchpad.net/inkscape/+bug/1495386/+attachment/4875733/+files/AESYSMAT.zip
[6] https://bugs.launchpad.net/inkscape/+bug/1508928/+attachment/4502390/+files/%E9%87%91%E6%A2%85%E6%AF%9B%E8%A1%8C%E6%9B%B8.ttf

_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list



--


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