34个版本 (22个重大更改)
新版本 0.22.1 | 2024年8月24日 |
---|---|
0.21.0 | 2024年6月14日 |
0.20.0 | 2024年1月19日 |
0.19.0 | 2023年10月19日 |
0.0.1 | 2014年12月11日 |
24 在 图形API 中
97,306 每月下载量
用于 160 个库 (11 个直接使用)
5.5MB
120K SLoC
freetype-sys 
FreeType字体库的低级绑定。
静态链接到FreeType
如果启用了 bundled
功能,freetype-sys
将构建并链接FreeType的静态副本。这需要一个C编译器。包含的FreeType版本是2.13.2。
[dependencies]
freetype-sys = { version = "0.21", features = ["bundled"] }
针对Windows用户
-pc-windows-gnu
为了轻松设置FreeType,只需获取MSYS2并安装以下包之一: mingw-w64-x86_64-freetype
或 mingw-w64-i686-freetype
,然后在MSYS2的正确MinGW shell中运行Rust。
有关为Rust设置MSYS2的更多信息,请参阅Rust源代码安装文档。
-pc-windows-msvc
FreeType的预构建库可在此处找到。
在项目的根目录、父目录之一或您的家目录中创建一个.cargo目录。此目录应包含一个config
文件,其中包含以下片段
[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"]
有关更多信息,请参阅官方Cargo文档。