Using different space glyphs

I’m looking at using Contextual Alternates to substitute the space with either a hair, thin or thick space.

Unicode values
Hair = 200A
6 em = 2006
Thin = 2009
Thick = 2004
(as detailed in code page “General Punctuation Range: 2000–206F”

However, I see odd text wrapping occurring. Is there a way to use these different spaces in text layout?

Thanks for for any thoughts
Jeremy

You should not substitute glyphs with a different unicode. You can either substitute an alternate space (like “space.thin”) or use contextual GPOS.

Thanks Georg,

I had them as space.hair, space.sixth, space.thin, space.thick with no unicodes – so they would just be read as space (u+0020). However, this is when I saw the odd line breaking. I’ve gone back to using no unicodes and will try again.

Could the use of a more narrow value than the set space glyph be interpreted by the text layout engine as a continuous word (so no gap between the word), resulting in not knowing what to do. I don’t have hypenation applied.

I didn’t want to use contextual kerning as the article at Contextual kerning | Glyphs says that the value can’t be interpolated across the fonts. By altering the space value I can benefit from different glyph widths across the font export range.

For variable fonts, you can use variable poisoning as written in that tutorial under “Interpolating kerning values”.

And for static fonts, you can use tokens to master numbers. Tokens — Glyphs Handbook

Gosh, that sounds frightening!

1 Like