4 个版本
0.2.0 | 2023年4月15日 |
---|---|
0.1.2 | 2023年2月27日 |
0.1.1 | 2023年2月27日 |
0.1.0 | 2023年2月27日 |
#31 in #opentype
6KB
57 代码行
HarfBuzz Bindings for Rust
使用 bindgen 生成的 HarfBuzz 文本形状引擎的 Rust 绑定,支持最新的 HarfBuzz 版本。
先决条件
- 安装
vcpkg
(https://github.com/microsoft/vcpkg) - 使用
vcpkg install harfbuzz --triplet x64-windows-static
安装harfbuzz
以获取静态编译的 HarfBuzz 版本(或与目标操作系统匹配的其他 triplet) - 设置环境变量
RUSTFLAGS = "-Ctarget-feature=+crt-static"
- 设置
bindgen
(https://rust-lang.github.io/rust-bindgen/requirements.html)
使用
将此依赖项添加到您的 Cargo.toml
[dependencies]
harfbuzz-bindings = "0.2"
然后运行 cargo build
!
更多信息
此软件包已根据 bindgen 教程 实现。
依赖项
~0–1.9MB
~36K SLoC