#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

#26 in Graphics APIs

Download history 5247/week @ 2024-10-22 4773/week @ 2024-10-29 4281/week @ 2024-11-05 4185/week @ 2024-11-12 4305/week @ 2024-11-19 4889/week @ 2024-11-26 4493/week @ 2024-12-03 5499/week @ 2024-12-10 4415/week @ 2024-12-17 3196/week @ 2024-12-24 3882/week @ 2024-12-31 5147/week @ 2025-01-07 5834/week @ 2025-01-14 4585/week @ 2025-01-21 5567/week @ 2025-01-28 11302/week @ 2025-02-04

28,099 downloads per month
Used in 66 crates (24 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