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

#158 in Operating systems

Download history 6063/week @ 2024-08-22 5130/week @ 2024-08-29 4929/week @ 2024-09-05 4412/week @ 2024-09-12 4717/week @ 2024-09-19 5615/week @ 2024-09-26 4034/week @ 2024-10-03 4113/week @ 2024-10-10 4746/week @ 2024-10-17 5016/week @ 2024-10-24 4386/week @ 2024-10-31 3704/week @ 2024-11-07 3571/week @ 2024-11-14 4420/week @ 2024-11-21 4849/week @ 2024-11-28 3721/week @ 2024-12-05

17,142 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
~55K SLoC