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

Download history 26371/week @ 2024-05-05 26416/week @ 2024-05-12 22749/week @ 2024-05-19 23999/week @ 2024-05-26 22698/week @ 2024-06-02 24695/week @ 2024-06-09 27199/week @ 2024-06-16 26295/week @ 2024-06-23 21983/week @ 2024-06-30 22382/week @ 2024-07-07 22708/week @ 2024-07-14 25350/week @ 2024-07-21 21933/week @ 2024-07-28 24486/week @ 2024-08-04 28557/week @ 2024-08-11 20356/week @ 2024-08-18

97,306 每月下载量
用于 160 个库 (11 个直接使用)

MIT 许可证

5.5MB
120K SLoC

C 106K SLoC // 0.2% comments Visual Studio Project 9K SLoC // 0.0% comments Rust 1.5K SLoC // 0.0% comments Python 1.5K SLoC // 0.8% comments M4 691 SLoC // 0.4% comments Perl 422 SLoC // 0.1% comments Visual Studio Solution 405 SLoC C++ 261 SLoC // 0.2% comments Shell 251 SLoC // 0.2% comments AWK 142 SLoC Forge Config 38 SLoC // 0.8% comments JavaScript 34 SLoC // 0.3% comments HICAD 24 SLoC BASH 2 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-freetypemingw-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文档

依赖关系