#font

crossfont

Cross platform native font loading and rasterization

2 releases

new 0.1.1 Oct 16, 2020
0.1.0 Jul 18, 2020

#38 in Operating systems

Download history 717/week @ 2020-07-14 1887/week @ 2020-07-21 2691/week @ 2020-07-28 1817/week @ 2020-08-04 1476/week @ 2020-08-11 1336/week @ 2020-08-18 1451/week @ 2020-08-25 1192/week @ 2020-09-01 1095/week @ 2020-09-08 1094/week @ 2020-09-15 1502/week @ 2020-09-22 1283/week @ 2020-09-29 1280/week @ 2020-10-06 1256/week @ 2020-10-13

6,397 downloads per month
Used in alacritty

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 Mac OS. FreeType is used on everything that's not Mac OS. Eventually, ClearType support will be available for windows.

Dependencies

~1–3MB
~70K SLoC