Re:Libschrift: A lightweight TrueType font rendering library
by HelloNurse on Tuesday April 21, 2020 @06:48AM
(#22933729)
If 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.
[ Parent
| on HN ]
Re:Libschrift: A lightweight TrueType font rendering library
by flohofwoe on Tuesday April 21, 2020 @07:33AM
(#22933957)
No, 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.
Re:Libschrift: A lightweight TrueType font rendering library
by echeese on Tuesday April 21, 2020 @08:00AM
(#22934116)
Yeah that sounds like something like Harfbuzz could do.
Re:Libschrift: A lightweight TrueType font rendering library
by mmm_grayons on Tuesday April 21, 2020 @09:13AM
(#22934640)
True, though at that point, you've left the domain of "lightweight" far behind.