Crates.io | freetype-sys |
lib.rs | freetype-sys |
version | 0.23.0 |
source | src |
created_at | 2014-12-11 20:18:06.235838 |
updated_at | 2024-10-20 13:17:28.409668 |
description | Low level binding for FreeType font library |
homepage | https://github.com/PistonDevelopers/freetype-sys |
repository | https://github.com/PistonDevelopers/freetype-sys.git |
max_upload_size | |
id | 528 |
size | 18,074,210 |
Low level bindings for the FreeType font library.
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"] }
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.
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.