An experiment with font rendering techniques. (Olle Alvin (2020) did an awesome literature review for this topic.)
The current implementation is based on the signed distance field text rendering technique introduced by Chirs Green (2007). I would also like to implement the multi-channel signed distance field text rendering method proposed by Viktor Chlumský (2015) later.
-
Use mouse wheel to zoom in/out
-
Use mouse drag to pan around
Note
Only supports displaying Extended ASCII characters for the moment
- Move the font texture generation procedure into a worker thread
- Replace tinySDF with msdfgen-wasm to get better rendering result
yarn
yarn build
yarn preview --port 8080 # Check out http://localhost:8080
yarn test
Resolution-independent font rendering: