If you work a lot with SFD files, there is now a tested Python library for encoding/decoding the quoted strings in them.
sfdutf7·py — github.com/ctrlcctrlv/sfdutf…
PyPI: pypi.org/project/sfdutf7/
~ @fr_brennan
This is the most horrifying code I've ever written.
Thanks for the IMAPClient implementation @mjs0 lol
github.com/ctrlcctrlv/sfdutf…
Replying to @FontForge @RatanKarna
Meanwhile 'pres' lookup 11 looks alright to me, although you probably can cut latn{dflt}.
You can't mix dev2 and deva like this and expect it to work.
Also, I must caution you, Indic shaping is likely broken in MetricsView. Please rely on HarfBuzz. Cf github.com/fontforge/fontfor….
Replying to @RatanKarna
I took a look. Sorry to tell you I'm not an expert in Indic shaping, which uses very different (script-dependent) rules than normal OpenType shaping.
However I still may know what's wrong. Only the lookup marked 'pres' Pre Base Substitutions lookup 19 has this strange metadata:
By "SVG font", FontForge means the outmoded SVG 1.1 standard, *not* SVG-in-OpenType, a type of OpenType font which contains SVG files for its glyphs, which it cannot yet create.
And, even its SVG 1.1 support has issues, cf. e.g. github.com/fontforge/fontfor….
Workarounds below.
You may not want to put such a path in a TrueType font, however, as while some rasterizers might handle it correctly (left), others, may handle it incorrectly (right).
This is one reason you should avoid self-intersecting paths in your final outputs. Althugh, certain self intersecting paths can all be valid, especially in variable fonts. For example:
The reason for this is that a single self-intersecting contour actually has multiple directions.
Therefore, to ask, "what direction is this contour in", is an unanswerable question. Both and neither.
But sometimes a contour is of indeterminate direction. Any self-intersecting contour, for example, is of indeterminate direction, and the options to set clockwise or counter-clockwise will be greyed out.















