Comment

Comment by cmyr

Hinting might be a red herring here: these font formats are unsafe almost by design, since they consistently rely on a pattern of reading a value out of a chunk of memory and then treating that value as a pointer offset where additional values are read.

The proposed WASM shaping implementation would be a replacement for traditional OpenType layout[1] which is already turing complete[2]), and in this sense using WASM is significantly safer than the alternative. Your comment suggests that "execution of arbitrary WASM code" is something that we should be scared of, but the entire point of WASM is that it allows for safe/isolated compilation of arbitrary code.

[1] https://simoncozens.github.io/fonts-and-layout/features.html

[2] https://litherum.blogspot.com/2019/03/addition-font.html

parent cmyr 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton