14 releases (7 breaking)

0.8.0 Feb 23, 2024
0.7.0 Dec 11, 2023
0.6.0 Dec 5, 2023
0.5.2 Nov 24, 2023
0.1.0 Jul 18, 2020

#115 in Operating systems

Download history 6575/week @ 2024-06-16 6067/week @ 2024-06-23 4726/week @ 2024-06-30 5327/week @ 2024-07-07 7106/week @ 2024-07-14 7142/week @ 2024-07-21 5464/week @ 2024-07-28 5498/week @ 2024-08-04 8059/week @ 2024-08-11 5539/week @ 2024-08-18 5737/week @ 2024-08-25 4955/week @ 2024-09-01 4658/week @ 2024-09-08 4450/week @ 2024-09-15 5369/week @ 2024-09-22 4674/week @ 2024-09-29

19,709 downloads per month
Used in 8 crates (2 directly)

Apache-2.0

105KB
2.5K SLoC

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.


lib.rs:

Compatibility layer for different font engines.

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

Dependencies

~0.3–6.5MB
~45K SLoC