From 8dd5c44b761d276d207214085c27a910998f7eeb Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 11 Sep 2023 23:56:44 +0700 Subject: [PATCH] Use `freetype-sys` rather than Servo's `freetype`. This simplifies the dependency graph as we weren't getting anything from using the Servo `freetype` crate here as it also built and depended upon `freetype-sys`. Fixes #238. --- harfbuzz-sys/Cargo.toml | 5 +++-- harfbuzz-sys/src/freetype.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/harfbuzz-sys/Cargo.toml b/harfbuzz-sys/Cargo.toml index e6007b02..6ddd772e 100644 --- a/harfbuzz-sys/Cargo.toml +++ b/harfbuzz-sys/Cargo.toml @@ -37,8 +37,8 @@ version = "0.3" optional = true features = ["dwrite"] -[dependencies.freetype] -version = "0.7" +[dependencies.freetype-sys] +version = "0.18" optional = true [features] @@ -46,3 +46,4 @@ default = ["coretext", "directwrite", "freetype"] bundled = [] coretext = ["core-graphics", "core-text", "foreign-types"] directwrite = ["winapi"] +freetype = ["freetype-sys"] diff --git a/harfbuzz-sys/src/freetype.rs b/harfbuzz-sys/src/freetype.rs index e3736730..094af0ce 100644 --- a/harfbuzz-sys/src/freetype.rs +++ b/harfbuzz-sys/src/freetype.rs @@ -11,5 +11,5 @@ use crate::hb_font_t; extern "C" { /// This requires that the `freetype` feature is enabled. - pub fn hb_ft_font_create_referenced(face: freetype::freetype::FT_Face) -> *mut hb_font_t; + pub fn hb_ft_font_create_referenced(face: freetype_sys::FT_Face) -> *mut hb_font_t; }