From 9673c8c1b78ff9accf04bf4f2d1cb680d17a5a2b Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 22 Feb 2018 21:07:17 -0800 Subject: [PATCH] roll back bundling of harfbuzz This will likely break travis; I'll follow up with something to help with that. Refs: https://github.com/wez/wezterm/issues/1 --- Cargo.toml | 4 +--- src/font/fontconfigandfreetype.rs | 2 +- harfbuzz/src/lib.rs => src/font/hbwrap.rs | 8 +++----- src/font/mod.rs | 3 ++- src/font/system.rs | 2 +- src/main.rs | 2 +- 6 files changed, 9 insertions(+), 12 deletions(-) rename harfbuzz/src/lib.rs => src/font/hbwrap.rs (98%) diff --git a/Cargo.toml b/Cargo.toml index 470ce9754..32be60185 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ euclid = "0.17.0" failure = "0.1.1" gl = "0.10.0" glium = "0.20.0" +harfbuzz-sys = "0.1.15" libc = "0.2.36" mio = "0.6.12" palette = "0.2.1" @@ -17,9 +18,6 @@ serde_derive = "1.0.27" toml = "0.4.5" unicode-width = "0.1.4" -[dependencies.harfbuzz] -path = "harfbuzz" - [dependencies.term] path = "term" diff --git a/src/font/fontconfigandfreetype.rs b/src/font/fontconfigandfreetype.rs index bb066399f..3989e0b57 100644 --- a/src/font/fontconfigandfreetype.rs +++ b/src/font/fontconfigandfreetype.rs @@ -6,7 +6,7 @@ use failure::{self, Error}; use font::{shape_with_harfbuzz, FallbackIdx, Font, FontMetrics, FontSystem, GlyphInfo, NamedFont, RasterizedGlyph}; use font::{fcwrap, ftwrap}; -use harfbuzz; +use super::hbwrap as harfbuzz; use std::cell::RefCell; use std::mem; use std::slice; diff --git a/harfbuzz/src/lib.rs b/src/font/hbwrap.rs similarity index 98% rename from harfbuzz/src/lib.rs rename to src/font/hbwrap.rs index b89efd665..5ec3d3f4e 100644 --- a/harfbuzz/src/lib.rs +++ b/src/font/hbwrap.rs @@ -1,12 +1,10 @@ //! Higher level harfbuzz bindings -#[macro_use] -extern crate failure; #[cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))] -extern crate freetype; +use freetype; -pub mod sys; -pub use sys::*; +use harfbuzz_sys as harfbuzz; +pub use self::harfbuzz::*; use failure::Error; diff --git a/src/font/mod.rs b/src/font/mod.rs index fa35141f5..f475dc835 100644 --- a/src/font/mod.rs +++ b/src/font/mod.rs @@ -1,5 +1,6 @@ use failure::Error; -use harfbuzz; +mod hbwrap; +use self::hbwrap as harfbuzz; use std::cell::RefCell; use std::collections::HashMap; diff --git a/src/font/system.rs b/src/font/system.rs index 137efd5c8..0d0a3aa5c 100644 --- a/src/font/system.rs +++ b/src/font/system.rs @@ -2,7 +2,7 @@ use super::super::config::{Config, TextStyle}; use failure::Error; -use harfbuzz; +use super::hbwrap as harfbuzz; use unicode_width::UnicodeWidthStr; /// A bitmap representation of a glyph. diff --git a/src/main.rs b/src/main.rs index c9f819538..4f366b257 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,7 @@ extern crate freetype; extern crate gl; #[macro_use] extern crate glium; -extern crate harfbuzz; +extern crate harfbuzz_sys; extern crate libc; extern crate mio; extern crate palette;