#font #freetype #glyph

freetype-rs

Bindings for FreeType font library

59 releases (38 breaking)

new 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

#36 in Graphics APIs

Download history 5067/week @ 2024-09-20 5313/week @ 2024-09-27 4093/week @ 2024-10-04 4352/week @ 2024-10-11 4871/week @ 2024-10-18 4856/week @ 2024-10-25 4613/week @ 2024-11-01 4289/week @ 2024-11-08 4021/week @ 2024-11-15 4535/week @ 2024-11-22 4918/week @ 2024-11-29 4971/week @ 2024-12-06 5068/week @ 2024-12-13 3668/week @ 2024-12-20 3361/week @ 2024-12-27 4349/week @ 2025-01-03

17,338 downloads per month
Used in 66 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