@mcc @foone https://fox.nexus/@theresnotime/112667464410894991
someone embedded a llm (llama something) in font file.
when using harfbuzz, a TTF font can run WebAssembly. This is commonly used for advanced positioning for difficult scripts like Arabic
ngl the worst bit about https://github.com/fuglede/llama.ttf is the fact you can execute WebAssembly in a font file.
@4censord @mcc This is a bit misleading. TTF fonts can contain instructions in *any* language or IR for *any* purpose. How (or whether at all) those get executed is a different matter.
As I understand it, there's no Wasm support in TrueType and no Wasm running on the TrueType VM either. Rather, it just uses this Harfbuzz feature: https://github.com/harfbuzz/harfbuzz/blob/main/docs/wasm-shaper.md
If this counts as the font ārunningā anything, you could trivially make a Doom font by hacking DosBox into a font rendering engine.
@4censord Yeah, I think that's more clear. Your original post isn't wrong either; I mainly meant to clarify that it's not like TTF has grown some Wasm-feature lately.
Even more precise but uglier, āa TrueType font can contain Wasm code which might be run by some versions of Harfbuzzā.
For maxim technical correctness, it's hard to do better than simply refer to the (succinct!) āUsageā section in https://github.com/fuglede/llama.ttf/blob/master/README.md ;)