32 releases (21 breaking)

0.21.0 Jun 14, 2024
0.20.0 Jan 19, 2024
0.19.0 Oct 19, 2023
0.17.0 Nov 16, 2022
0.0.1 Dec 11, 2014

#28 in Graphics APIs

Download history 25741/week @ 2024-04-04 30129/week @ 2024-04-11 32050/week @ 2024-04-18 27221/week @ 2024-04-25 27064/week @ 2024-05-02 27323/week @ 2024-05-09 24408/week @ 2024-05-16 22527/week @ 2024-05-23 22928/week @ 2024-05-30 23664/week @ 2024-06-06 27376/week @ 2024-06-13 26703/week @ 2024-06-20 23704/week @ 2024-06-27 22443/week @ 2024-07-04 21438/week @ 2024-07-11 20227/week @ 2024-07-18

92,032 downloads per month
Used in 159 crates (11 directly)

MIT license

7MB
141K SLoC

C 106K SLoC // 0.2% comments Visual Studio Project 9K SLoC // 0.0% comments Shell 9K SLoC // 0.2% comments M4 7.5K SLoC // 0.2% comments JavaScript 6K SLoC // 0.1% comments Rust 1.5K SLoC // 0.0% comments Python 1.5K SLoC // 0.8% comments Perl 422 SLoC // 0.1% comments Visual Studio Solution 391 SLoC AWK 142 SLoC Forge Config 38 SLoC // 0.8% comments HICAD 24 SLoC BASH 2 SLoC

Contains (autotools obfuscated code, 565KB) freetype2/builds/unix/configure, (obscure autoconf code, 34KB) freetype2/builds/unix/configure.ac

freetype-sys Build Status Build status

Low level bindings for the FreeType font library.

Statically linking against FreeType

If the bundled feature is enabled, freetype-sys will build and link a static copy of FreeType. This requires a C compiler. The included version of FreeType is 2.13.2.

[dependencies]
freetype-sys = { version = "0.21", features = ["bundled"] }

For Windows users

-pc-windows-gnu

In order to easily setup FreeType just get MSYS2 and install either the mingw-w64-x86_64-freetype or mingw-w64-i686-freetype package and then use Rust from within the correct MinGW shell of MSYS2.

More information on setting up MSYS2 for Rust can be found in the Rust installing from source document.

-pc-windows-msvc

Prebuilt libraries for FreeType are available here.

Then in the root of your project, in one of the parent directories, or in your home directory, create a .cargo directory. This directory should contain a config file that contains the following snippet:

[target.i686-pc-windows-msvc.freetype]
rustc-link-search = ["C:\\Path\\To\\binaries\\i686"]
rustc-link-lib = ["freetype"]

[target.x86_64-pc-windows-msvc.freetype]
rustc-link-search = ["C:\\Path\\To\\binaries\\x86_64"]
rustc-link-lib = ["freetype"]

For more informations, check the official Cargo documentation.

Dependencies