from Hacker News

Ask HN: How do Chinese fonts work?

by barbinbrad on 3/1/23, 12:56 PM with 2 comments

  • by PaulHoule on 3/1/23, 1:02 PM

    Font metrics are really easy because they are all square. I wrote a rendering engine on top of Pillow for vertically oriented Japanese text and people are often impressed that I did, but it was not hard at all -- the one thing wrong with it is that it doesn't do a great job of rendering the occasional Roman character which shows up in the proper names that I set (e.g. the second season of the Sailor Moon anime is written as "セーラームーンR" in Japanese)

    Kerning for Serifed Roman characters is devilishly hard, enough that a lot of people have given up on using serif display fonts because they never look right. I thought the problem wasn't so bad 20 years ago and I don't know if I should blame a patent troll or if I am just pickier than I was.

  • by abudabi123 on 3/1/23, 1:49 PM

    The shaping engine takes text, maps codepoints to glyphs in the font, textual sequences of codepoints then appear on screen in script form obeying rules.

    https://harfbuzz.github.io/why-do-i-need-a-shaping-engine.ht...