tectonic/crates/bridge_freetype2
Peter Williams 2c1ffcd702 BREAKING: fix up include-dir handling
It turns out that in order to get the C/C++ crate-bridging to work
reliably with headers, we can't get away with exposing just a single
include directory from one crate to another; we have to expose a list of
include directories. So, change all of the relevant cases to be
semicolon-separated lists instead of single directory names. Not my
favorite but I don't see a way around it.
2021-01-30 11:47:09 -05:00
..
src crates/bridge_freetype2: add this 2021-01-09 13:41:29 -05:00
CHANGELOG.md crates/bridge_freetype2: add this 2021-01-09 13:41:29 -05:00
Cargo.toml crates/bridge_freetype2: add this 2021-01-09 13:41:29 -05:00
README.md BREAKING: fix up include-dir handling 2021-01-30 11:47:09 -05:00
build.rs BREAKING: fix up include-dir handling 2021-01-30 11:47:09 -05:00

README.md

The tectonic_bridge_freetype2 crate

This crate is part of the Tectonic project. It exposes the C API of the FreeType font rendering engine within the Rust/Cargo build framework, with no Rust bindings.

There are a variety of other low-level FreeType-related crates available, including:

This package is distinctive because:

  • It uses Tectonics dependency-finding framework, which supports both pkg-config and vcpkg.
  • It ensures that FreeTypes C API is exposed to Cargo.

Ideally, one day this crate will be superseded by one of the above crates.

If your project depends on this crate, Cargo will export for your build script an environment variable named DEP_FREETYPE2_INCLUDE_PATH, which will be a semicolon-separated list of directories containing C headers, such that your code will be able to successfully include the ft2build.h header.

You will need to ensure that your Rust code actually references this crate in order for the linker to include linked libraries. A use statement will suffice:

#[allow(unused_imports)]
#[allow(clippy::single_component_path_imports)]
use tectonic_bridge_freetype2;

Cargo features

At the moment this crate does not provide any Cargo features. It is intended that eventually it will, to allow control over whether the FreeType library is vendored or not.