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

#81 in Operating systems

Download history 6340/week @ 2023-12-25 7038/week @ 2024-01-01 7654/week @ 2024-01-08 6281/week @ 2024-01-15 7046/week @ 2024-01-22 6612/week @ 2024-01-29 8018/week @ 2024-02-05 6161/week @ 2024-02-12 7017/week @ 2024-02-19 7351/week @ 2024-02-26 6624/week @ 2024-03-04 6256/week @ 2024-03-11 6357/week @ 2024-03-18 7087/week @ 2024-03-25 6899/week @ 2024-04-01 3581/week @ 2024-04-08

24,647 downloads per month
Used in 5 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.4–8.5MB
~50K SLoC