35 releases (23 breaking)

0.23.0 Oct 20, 2024
0.21.0 Jun 14, 2024
0.20.0 Jan 19, 2024
0.19.0 Oct 19, 2023
0.0.1 Dec 11, 2014

#23 in Graphics APIs

Download history 23254/week @ 2024-07-30 26320/week @ 2024-08-06 25998/week @ 2024-08-13 22732/week @ 2024-08-20 26313/week @ 2024-08-27 27205/week @ 2024-09-03 23815/week @ 2024-09-10 20684/week @ 2024-09-17 25311/week @ 2024-09-24 22278/week @ 2024-10-01 22309/week @ 2024-10-08 24491/week @ 2024-10-15 25084/week @ 2024-10-22 24802/week @ 2024-10-29 22983/week @ 2024-11-05 18923/week @ 2024-11-12

96,318 downloads per month
Used in 169 crates (11 directly)

MIT license

9MB
196K SLoC

C 160K SLoC // 0.2% comments Visual Studio Project 11K SLoC // 0.0% comments Shell 10K SLoC // 0.2% comments M4 8K SLoC // 0.2% comments Python 1.5K SLoC // 0.7% comments Rust 1.5K SLoC // 0.0% comments AWK 1K SLoC // 0.3% comments Visual Studio Solution 639 SLoC Perl 422 SLoC // 0.1% comments C++ 417 SLoC // 0.2% comments Automake 276 SLoC // 0.2% comments Batch 66 SLoC // 0.2% comments Forge Config 38 SLoC // 0.8% comments JavaScript 34 SLoC // 0.3% comments GNU Style Assembly 25 SLoC // 0.5% comments HICAD 24 SLoC BASH 2 SLoC

Contains (autotools obfuscated code, 515KB) libpng/configure, (obscure autoconf code, 25KB) libpng/configure.ac

freetype-sys 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 information, check the official Cargo documentation.

Dependencies