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

#147 in Operating systems

Download history 7220/week @ 2024-07-17 6586/week @ 2024-07-24 5357/week @ 2024-07-31 7962/week @ 2024-08-07 5557/week @ 2024-08-14 5976/week @ 2024-08-21 5136/week @ 2024-08-28 4961/week @ 2024-09-04 4536/week @ 2024-09-11 4688/week @ 2024-09-18 5577/week @ 2024-09-25 4189/week @ 2024-10-02 3996/week @ 2024-10-09 4347/week @ 2024-10-16 5423/week @ 2024-10-23 3756/week @ 2024-10-30

18,082 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–7MB
~57K SLoC