~inkscape.dev/inkscape/extensionImprovements

Viewing all changes in revision 15687.

  • Committer: Eduard Braun
  • Date: 2017-05-10 22:22:53 UTC
  • Revision ID: eduard.braun2@gmx.de-20170510222253-zvucfd0xoycu77xf
Fix crash with fonts containing illegal characters in family name.

In the problem at hand [1] the crash is caused by a font with the name "Æ Systematic -BRK-". However the font family name returned by pango is "\xc6 Systematic - BRK-". "(\xc6" is the character code of "Æ" in Latin-1 encoding, but is not a valid UTF-8 character, so obviously at some point there went something wrong with character encoding conversion)

At this time it is unclear to me where in the chain the issue originates, as it's possible that
a) the font name is already stored incorrectly in the font file
b) fontconfig incorrectly parses the font file when creating the font cache
c) pango messes up somehow

For now we ignore fonts with illegal characters in file name as they cause a whole lot of issues (even before triggering a crash), but figuring out the above and (if applicable) work around it in Inkscape might make the font available after all.

[1] https://answers.launchpad.net/inkscape/+question/630886

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: