googlefonts / ufo2ft

A bridge from UFOs to FontTools objects (and therefore, OTFs and TTFs).
MIT License
152 stars 43 forks source link

[outlineCompiler] Make space the 2nd glyph unless its order is explicitly set #881

Closed khaledhosny closed 1 month ago

khaledhosny commented 1 month ago
khaledhosny commented 1 month ago

The second commit is just in case someone wants this level of control, but I have no strong opinion here and I can do without it.

anthrotype commented 1 month ago

I would only move the space to second place if there is not already an explicit glyphOrder in the UFO. I don't see the point of having yet another custom parameter to "Keep GlyphOrder" in this situation. Either you don't care/define your own glyphOrder, in which case we do our best to place glyphs to maximise compatibility, or you do provide an explicit one and we just do what told.

anthrotype commented 1 month ago

as for glyphsLib, which always sets a glyphOrder in the exported master UFOs (whether implicit in the order of the glyphs in the source file, or with an explicit glyphOrder custom parameter), it can deal itself with those Glyphs-specific things. It may decide to always place the space in second place (like Glyphs does now?) regardless of what the stated glyphOrder is, unless the user uses "no, really I mean it" custom parameter..

khaledhosny commented 1 month ago

Makes sense. I’ll do that.

khaledhosny commented 1 month ago

Done.

khaledhosny commented 1 month ago

This does not work. We don’t actually know if public.glyphOrder is set or not, we ask the font for glyphOrder and it gives us one (defcon at least will make up something if public.glyphOrder is not set).

khaledhosny commented 1 month ago

I think it is working now.

anthrotype commented 1 month ago

much better now, thanks!

anthrotype commented 1 month ago

@khaledhosny where did you see that "Keep GlyphOrder" custom parameter in Glyphs.app? I can't find it in either font custom parameters or variable font export settings. I am using Glyphs.app 3.3 (3324)

khaledhosny commented 1 month ago

@khaledhosny where did you see that "Keep GlyphOrder" custom parameter in Glyphs.app? I can't find it in either font custom parameters or variable font export settings. I am using Glyphs.app 3.3 (3324)

https://forum.glyphsapp.com/t/custom-glyphorder-is-not-respected/31555/4

anthrotype commented 1 month ago

but it's not there... weird

khaledhosny commented 1 month ago

Yes, even if you type the name it does not recognize it and just adds a generic custom parameter, I guess it didn’t make it to release.