#font #freetype #glyph

freetype-rs

Bindings for FreeType font library

58 releases (37 breaking)

Uses old Rust 2015

0.37.0 Jun 14, 2024
0.36.0 Feb 15, 2024
0.35.0 Jan 19, 2024
0.34.1 Dec 7, 2023
0.0.0 Dec 11, 2014

#80 in Graphics APIs

Download history 7347/week @ 2024-07-21 5507/week @ 2024-07-28 5657/week @ 2024-08-04 8212/week @ 2024-08-11 5441/week @ 2024-08-18 5811/week @ 2024-08-25 4732/week @ 2024-09-01 4744/week @ 2024-09-08 4299/week @ 2024-09-15 5450/week @ 2024-09-22 5001/week @ 2024-09-29 3806/week @ 2024-10-06 4582/week @ 2024-10-13 4959/week @ 2024-10-20 5022/week @ 2024-10-27 4510/week @ 2024-11-03

19,581 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

~9.5MB
~207K SLoC