Google is rewriting HarfBuzz and FreeType in Rust

539 points Shnatsel

The author of HarfBuzz has published State of Text Rendering 2024, where he describes the ongoing rewrite of the entire open-source text rendering stack in Rust which is funded by Google Fonts.

The motivations for it are laid out at https://github.com/googlefonts/oxidize, and the actual code is at https://github.com/googlefonts/fontations. The individual crates are already published to crates.io, too!

The intent does seem to be to completely replace the C/C++ code in HarfBuzz and FreeType in Android and Chrome, which would be a massive win for security. Numerous other HarfBuzz/FreeType users such as Firefox and all the Linux desktop would also benefit.

Curiously, Microsoft is rewriting their proprietary font parsing code in Rust as well: https://redd.it/12yg3cp