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



Hi Werner and Behdad,

thanks for your answers!


Am 18.05.2017 um 21:39 schrieb Behdad Esfahbod:
For the ttf in [6] I cannot spot any from the output of fc-query.
I'm afraid I wasn't able to reproduce a crash with that font myself so I wouldn't even rule out that the font attached by the user did not even cause the problems reported.

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.
Well, Inkscape isn't crashing anymore (as I took the radical approach of axing any font with illegal UTF8 characters in family name). The crashing is not too surprising as Inkscape (especially GTK+ and glib at that) usually expect UTF-8 strings to be valid, and I think that is a good assumption: If a font name includes an invalid UTF-8 character something went wrong at some point and I doubt it makes much sense to work around that in Inkscape. As it's not a common bug and you both seem positive this is not an issue in any of the involved libraries (Windows is often "complicated" when it gets to character set conversion, so there are often issues not exposed on *nix) I guess there's not much I can (or want) to do about it at this time...


Am 20.05.2017 um 08:10 schrieb Werner LEMBERG:
The one in [5] is a Windows .fon font.  It's possible that there's a
bug in FreeType driver for that format.
As far as I can see, there is no FreeType bug.  According to the FNT
specification[1], the family name must be ASCII, which is not true for
this font.
That's useful information! In that case I'd say this can safely be judged as a "bug" in the font. While I guess it could be worked around, as already stated above I don't think it's the job of any software to work around the issues arising from fonts that do not follow the respective format's specification.

Best Regards,
Eduard



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