#font-glyph #font #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

#214 in Text processing

Download history 4956/week @ 2025-01-05 5763/week @ 2025-01-12 5104/week @ 2025-01-19 4563/week @ 2025-01-26 11687/week @ 2025-02-02 6742/week @ 2025-02-09 4400/week @ 2025-02-16 6130/week @ 2025-02-23 5187/week @ 2025-03-02 6656/week @ 2025-03-09 6593/week @ 2025-03-16 6395/week @ 2025-03-23 5811/week @ 2025-03-30 10407/week @ 2025-04-06 9723/week @ 2025-04-13 6427/week @ 2025-04-20

33,085 downloads per month
Used in 247 crates (25 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
~221K SLoC