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



On Sun, May 21, 2017 at 4:02 PM, Eduard Braun <eduard braun2 gmx de> wrote:

Am 18.05.2017 um 21:39 schrieb Behdad Esfahbod:

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,

Can you point me to the crash stacktrace?  I couldn't find it browsing your links casually.
 
and I think that is a good assumption:

Not necessarily.  I'm of the opinion that our libraries should not crash on invalid input to the extent possible.

 
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]