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

#155 in Operating systems

Download history 7236/week @ 2024-07-22 5259/week @ 2024-07-29 5650/week @ 2024-08-05 7931/week @ 2024-08-12 5786/week @ 2024-08-19 5577/week @ 2024-08-26 4890/week @ 2024-09-02 4594/week @ 2024-09-09 4504/week @ 2024-09-16 5350/week @ 2024-09-23 5031/week @ 2024-09-30 3466/week @ 2024-10-07 4449/week @ 2024-10-14 5208/week @ 2024-10-21 4725/week @ 2024-10-28 4196/week @ 2024-11-04

19,010 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
~56K SLoC