Custom glyphOrder is not respected

I set the glyph order via custom parameter, but Glyphs still puts space as the second glyph in the font. Is there a reason for this? When I set a custom order, I do so because I mean it :wink:

In:

{
customParameters = (
{
name = glyphOrder;
value = (
.notdef,
A,
Aacute,
Acircumflex
);
}
);
}

Out:

    <GlyphID id="0" name=".notdef"/>
    <GlyphID id="1" name="space"/>
    <GlyphID id="2" name="A"/>
    <GlyphID id="3" name="Aacute"/>
    <GlyphID id="4" name="Acircumflex"/>

The only way to get the glyph order I want (for compatibility with a previous version of the font) is to fix it manually in a ttx file.

Glyphs reorders .notdef and space by default, regardless of the glyphOrder parameter. But you can prevent that by adding a “TrueType Keep GlyphOrder” parameter (in the font or instances).

I love a good secret custom parameter :wink:

But unfortunately, it doesn’t solve the problem, as the fonts are not TrueType, but CFF…

I added a “Keep GlyphOrder” parameter that covers both, CFF and TT export. Will be in 3322.

1 Like

I actually cannot find this “Keey GlyphOrder” (nor “TrueType Keep GlyphOrder”) when I try to add one in my Glyphs 3.3 (3324)

1 Like

Those are not public (yet). Just put it into the Add parameter dialog and hit Add.

It’s shown as a text field for me when I add it. Is it OK like this?

Bildschirmfoto 2024-10-16 um 14.09.06

The value gets saved as string, though, so both 0 and 1 will evaluate to True in Python code.

@khaled Since the default is to use the built-in order (i.e., Keep GlyphOrder = false) and the setting is only there to provide a way not to do this, it doesn’t really make that much sense to have a negative value for it at all. If you need a false value, just remove the parameter.

Presumably once it becomes a public parameter, it will be a checkbox whose value is stored as a boolean.

Glyphs files use the OpenStep-flavor Property List format as their container format. This format has no native Boolean type and so Glyphs is already using 0 and 1 to encode Boolean values (for example, automatic = 1; or exports = 0;).

Once these custom parameters are past their initial testing phase, we will make them “public”, that is, they are added to the search UI and get nice checkboxes. The encoded values in the file will stay the same.

When I tried it, 1 or 0 was saved as "1" and "0" in the file (note the quotes), not as integers.

OpenStep-flavor Property List files also have no native number type, just strings, data, arrays, and dictionaries. Glyphs writes numeric values without quotes to make the encoded file a bit more readable, but technically the quotes don’t change the semantics of the parameter. I would suspect that Glyphs starts writing these values without quotes once the custom parameter is public.

I missed the type definition for the parameter. I added it.

When is this new custom parameter going to be released? I still don’t see it in my 3.3 beta 3324 build. Note that glyphsLib has started to apply this already, since Release v6.9.3 · googlefonts/glyphsLib · GitHub

it is already in 3.3 and will show a proper checkbox in the next update. But not in the list but addable as described above.