#font #freetype #glyph

freetype-rs

Bindings for FreeType font library

59 releases (38 breaking)

0.38.0 Jan 8, 2025
0.37.0 Jun 14, 2024
0.36.0 Feb 15, 2024
0.34.1 Dec 7, 2023
0.0.0 Dec 11, 2014

#56 in Graphics APIs

Download history 5520/week @ 2024-09-25 4307/week @ 2024-10-02 4118/week @ 2024-10-09 4520/week @ 2024-10-16 5210/week @ 2024-10-23 4808/week @ 2024-10-30 4206/week @ 2024-11-06 4081/week @ 2024-11-13 4443/week @ 2024-11-20 5031/week @ 2024-11-27 4516/week @ 2024-12-04 5323/week @ 2024-12-11 4295/week @ 2024-12-18 3010/week @ 2024-12-25 4200/week @ 2025-01-01 4980/week @ 2025-01-08

17,195 downloads per month
Used in 64 crates (22 directly)

MIT license

110KB
1.5K SLoC

freetype-rs Build Status

Rust bindings for FreeType library

Requirements

  • Cargo: We use Cargo to compile the project.
  • FreeType2 development libraries: For installation instructions see freetype-sys.

If the building fails, then it is likely that pkg-config does not find a FreeType library it can bind to. Use the feature "bundled" to build a static version of the library (requires a C compiler):

[dependencies]
freetype-rs = { version = "*", features = ["bundled"] }

Build

Clone this repo then run

cd freetype-rs
cargo build

Examples

To build examples, use cargo test. They are all built in ./target/debug/examples/*.

To run examples, use cargo run --example name, for example:

cargo run --example single_glyph examples/assets/FiraSans-Regular.ttf A

How to contribute

Dependencies

~10MB
~223K SLoC