canonical / Ubuntu-Sans-fonts

Other
54 stars 4 forks source link

Softhyphen has contours #60

Closed guidoferreyra closed 1 year ago

guidoferreyra commented 1 year ago

⚠️ WARN

This font has a 'Soft Hyphen' character (codepoint 0x00AD) which is supposed to be zero-width and invisible, and is used to mark a hyphenation possibility within a word in the absence of or overriding dictionary hyphenation. It is mostly an obsolete mechanism now, and the character is only included in fonts for legacy codepage coverage. [code: softhyphen]

glenda-tn commented 1 year ago

Note that in the original versions, the soft hyphen is a component of the /hyphen (002D). This is common to see in older data. Some designers would also double encode it to the hyphen. Just FYI:

The documentation on the usage of the soft hyphen was recently updated in Unicode 15.

Unlike U+2010 HYPHEN, which always has a visible rendition, the character U+00AD SOFT HYPHEN (SHY) is an invisible format character that merely indicates a preferred intraword line break position. If the line is broken at that point, then whatever mechanism is appropriate for intraword line breaks should be invoked, just as if the line break had been triggered by another hyphenation mechanism, such as a dictionary lookup. Depending on the language and the word, that may produce different visible results...

djrrb commented 1 year ago

@glenda-tn what is your recommendation on the width of softhyphen in a monospace?

glenda-tn commented 1 year ago

hmm. That's a good question. Is zero-width not allowed in a monospace? If not, I wonder if a GPOS entry could collapse it to 0. @guidoferreyra do you know anything about this? I could ask Christopher Chapman who wrote the entry for Unicode 15.

djrrb commented 1 year ago

https://typedrawers.com/discussion/comment/12702/#Comment_12702 😵

glenda-tn commented 1 year ago

yes, that's why I suggested about the GPOS trick. Try setting the sfthyphen to 0 first and let's run it through FB. I imagine it should be ok because that's Google FB check.

I also think that we will want the isFixedPitch flag checked so that the font shows up in the FixedPitch Font menus. Other fonts that are monospaced, but don't meet all of the requirements (like they have dbl wide) are marketed as monospaced but as mentioned in the thread, don't have the isFixedPitch flag set or even the Panose flag set. It is important to NOT set these flags if there are double wide glyphs---because MS Office will otherwise force the fixed width.

djrrb commented 1 year ago

So, at least in Glyphsapp, if Fixed Pitch is set, it won’t allow you to set these at any other width than the monospace width. So rather than do something hacky in post-production, my feeling is that we can leave it at the monospace width.

glenda-tn commented 1 year ago

Given our findings with Roboto—it seems the Shapers will collapse uni00AD to 0 anyway. So yes, leave it at monowidth but do not put an outline in it.

djrrb commented 1 year ago

Removing contours.

djrrb commented 1 year ago

Pushed in e16eed91024b8f645f306c2ac6e17ee5307ea784