#font #bsd #linux

crossfont

Cross platform native font loading and rasterization

11 releases

new 0.5.2 Nov 24, 2023
0.5.1 Oct 24, 2022
0.5.0 Jul 9, 2022
0.3.2 Dec 11, 2021
0.1.0 Jul 18, 2020

#131 in GUI

Download history 8087/week @ 2023-08-04 7384/week @ 2023-08-11 6279/week @ 2023-08-18 6690/week @ 2023-08-25 5292/week @ 2023-09-01 5370/week @ 2023-09-08 6212/week @ 2023-09-15 5158/week @ 2023-09-22 5366/week @ 2023-09-29 5688/week @ 2023-10-06 5694/week @ 2023-10-13 7385/week @ 2023-10-20 6615/week @ 2023-10-27 5596/week @ 2023-11-03 6642/week @ 2023-11-10 5683/week @ 2023-11-17

25,889 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–2.9MB
~58K SLoC