Remix.run Logo
▲ anonymous908213 a day ago

Unicode is distinct from, and completely unrelated to, TrueType. Unicode does not require a virtual machine to interpret. You can simply express languages and their variations with Unicode + bitmap fonts.

▲roughly a day ago | parent [-]

Unless you want ligatures.

▲anonymous908213 a day ago | parent [-]

Do you really believe the only way to implement ligatures is with a virtual machine? Dumb and dirty psuedocode written in 5 seconds of thinking about it but come on, this is not that complicated.

  for each character in text
    characterToPrint = Parse(character)
    if character is LigatureStartCandidate
      characterToPrint = LookAheadForNextLigatureCandidateAndResolve(character)
    Print(characterToPrint)
▲roughly a day ago | parent [-]

And you've now gotten 92% of the way there. Iterate a few dozen more times to get up to 97%, 98%, 99%, etc., and eventually you'll have rewritten OpenType.

▲anonymous908213 a day ago | parent [-]

Would you like to elaborate on those few dozen more cases rather than handwaving them away? Embedding a VM into a font format is foundationally a ridiculous idea and should require real justification, although I know our industry is in love with anything that allows arbitrary code execution exploits.

▲roughly a day ago | parent | next [-]

I could, or you could open your mind to the idea that the reason opentype wound up being as complex as it is is because the problem space you’re trying to solve is more complicated than you think it is. There is a working reference implementation which does the thing you think can be done more cheaply, you’re just throwing popcorn from the cheap seats here.

▲fhars 15 hours ago | parent | prev [-]

That algorithm fails for languages as exotic as English with its three character ligatures like ffl that are used in truffle, but not in cufflink.

The real challenge is Arabic, though, see https://fontspec.org/opentype-shaping/opentype-shaping-arabi...

▲maratc 14 hours ago | parent [-]

I went to research your examples with Google, and interestingly enough, it now thinks that it's a "classic textbook example" while citing one source — this comment of yours (20 min old at the time):

> In typography, ligatures should be used in "truffle" but should not be used in "cufflink."

> This specific pair of words is a classic textbook example used by typographers and software developers to demonstrate the limitations of basic, automated font-rendering rules.

What a world to live in.

On the same point of yours, bad two-letter ligatures also exist: surfing (fi), selfless (fl), halftime (ft), etc. "Swordfish" is fine but "dwarfish" is not.

▲roughly 5 hours ago | parent [-]

The AI learns quick because it does not hold onto its ego.