4 ms·
"libschrift isn't ready for serious use yet. Most notably, compound glyph support is still missing, so some characters like Umlauts or accents will likely not
by davedx 7y ago
"libschrift isn't ready for serious use yet.
Most notably, compound glyph support is still missing, so some characters like Umlauts or accents will likely not work yet."
Isn't this necessary for quite a lot of non-Latin scripts?
- outadoc 7y agoIt's necessary for quite a lot of Latin scripts.
- flohofwoe 7y agoAt least umlauts also have their unique UNICODE code points and font glyphs, and AFAIK that's true for all European languages at least, and can be handled without special support down in the rendering engine as long as the input string has been "preprocessed" accordingly.
- HelloNurse 7y agoIf by "preprocessing" the string you mean hoping that the input contains, say, "LATIN CAPITAL LETTER U WITH GRAVE" instead of U and "COMBINING GRAVE ACCENT", it is an unacceptable luck-based strategy. Moreover, in practice both alternatives would be implemented in very similar ways (understanding tables of how to adjust the accent for a given letter vs. understanding tables of how the accented letter is decomposed into two glyphs): it's a safe assumption that a "lightweight" library does neither.
- deleted 7y ago[deleted]
- flohofwoe 7y agoNo, I mean that this replacement of U and "COMBINING GRAVE ACCENT" with a single codepoint for "LATIN CAPITAL LETTER U WITH GRAVE" can happen in a separate step in a separate library before that modified string is passed on to the text rendering library. I'm not entirely sure whether this works for "style ligatures", but it definitely works for umlauts and similar characters in all European languages.
- echeese 7y agoYeah that sounds like something like Harfbuzz could do.
- mmm_grayons 7y agoTrue, though at that point, you've left the domain of "lightweight" far behind.
- qa-tari 7y agoOn the contrary, this library currently cannot deal with a composed code point e.g. for “LATIN CAPITAL LETTER U WITH DIAERESIS” either, as TrueType fonts tend to only contain glyphs for the base letter and diacritical marks, but no combinations of them. This affects most accented characters from Latin-1, but not unique ones like ¶ or Þ.
- raphlinus 7y agoMost fonts will include some combinations (generally Latin-1), but not all that are encoded in Unicode. A proper shaping library such as Harfbuzz will navigate all possibilities, including composed and decomposed Unicode input, and fonts with both precomposed characters and separate glyphs for combining marks. Getting all this right would be highly challenging for a small, simple library, as it requires fine-grained knowledge of both Unicode and OpenType.
- ori_b 7y agoThat's why the first sentence you quoted is there.