Company
Date Published
Author
Daniel Peng
Word count
1089
Language
English
Hacker News points
2

Summary

Warp, an intelligent terminal with AI and team knowledge built-in, is being developed in Rust and has recently been cross-compiled to WebAssembly (WASM) to bring it to the web. To support different scripts, symbols, and emoji, Warp needs a robust font fallback mechanism, which was implemented by building an asynchronous font fallback system into its UI framework. This system allows consumers of the UI framework to define their own font fallback mappings, which are used to determine how to handle missing characters when rendering text. The chosen fonts for this purpose were the Noto font family and a patched version of Hack that includes Nerd Font icons. By loading in these fallback fonts lazily, Warp is able to support a wide range of input without compromising on user experience or binary size.