16 releases (8 breaking)

0.9.0 Jun 9, 2025
0.8.0 Feb 23, 2024
0.7.0 Dec 11, 2023
0.5.2 Nov 24, 2023
0.1.0 Jul 18, 2020

#184 in GUI

Download history 5742/week @ 2025-03-18 5098/week @ 2025-03-25 4185/week @ 2025-04-01 4395/week @ 2025-04-08 3594/week @ 2025-04-15 5863/week @ 2025-04-22 6017/week @ 2025-04-29 4300/week @ 2025-05-06 4048/week @ 2025-05-13 5485/week @ 2025-05-20 3782/week @ 2025-05-27 3439/week @ 2025-06-03 3911/week @ 2025-06-10 5391/week @ 2025-06-17 5444/week @ 2025-06-24 4142/week @ 2025-07-01

19,499 downloads per month
Used in 9 crates (2 directly)

Apache-2.0

105KB
2.5K SLoC

Compatibility layer for different font engines.

CoreText is used on macOS. DirectWrite is used on Windows. FreeType is used everywhere else.


crossfont

crossfont is a cross-platform Rust library for loading fonts and rasterizing glyphs, using native font engines whenever possible.

Supported Backends

Platform Backends
Linux Freetype
BSD Freetype
Windows DirectWrite
macOS Core Text

Known Issues

Since crossfont was originally made solely for rendering monospace fonts in Alacritty, there currently is only very limited support for proportional fonts.

Loading a lot of different fonts might also lead to resource leakage since they are not explicitly dropped from the cache.

Dependencies

~0.3–12MB
~70K SLoC