News for hackers. Stuff that matters.
Re:Cantonese Font with Pronunciation by jeffparsons on Monday May 08, 2023 @07:24PM (#35868257)
I've seen ligatures (or whatever the underlying feature is in font formats) used for some wild stuff, but this takes the cake. They're effectively encoding a small amount of natural language processing in a font.

Setting aside for a minute the question of whether you _should_, I wonder how far you can take this? I.e. what limits are there on how much context you can take into account, etc.?

Re:Cantonese Font with Pronunciation by philsnow on Monday May 08, 2023 @07:51PM (#35868502)
I think it also uses ligatures to render words from the "phrasebook", where you can take a word like "friend" and change the font from Times to this font, and it renders it as 朋友. Beautiful.
Re:Cantonese Font with Pronunciation by TylerE on Monday May 08, 2023 @08:39PM (#35868871)
Re:Cantonese Font with Pronunciation by jkwchui on Tuesday May 09, 2023 @02:34AM (#35870867)
(Font author)

This is all off the beaten path, so I suspect the answer is no one knows. Font tables have a limit of 65k characters, but this ceiling can be busted in whacky ways using multiple lookups, useExtension... Practically, font building tools / operations crash (mysteriously), stalls (mysteriously), or slows to a crawl (indistinguishable from stalling), and the Cantonese Font about pushes the limit.