diff --git a/wezterm-font/src/lib.rs b/wezterm-font/src/lib.rs index 7e12b7c88..89c78aa58 100644 --- a/wezterm-font/src/lib.rs +++ b/wezterm-font/src/lib.rs @@ -1,9 +1,14 @@ +use crate::locator::{new_locator, FontDataHandle, FontLocator, FontLocatorSelection}; +use crate::rasterizer::{new_rasterizer, FontRasterizer}; +use crate::shaper::{new_shaper, FontShaper, FontShaperSelection}; use anyhow::{anyhow, Error}; -mod hbwrap; - +use config::{configuration, ConfigHandle, FontRasterizerSelection, TextStyle}; use std::cell::RefCell; use std::collections::{HashMap, HashSet}; use std::rc::Rc; +use wezterm_term::CellAttributes; + +mod hbwrap; pub mod ftwrap; pub mod locator; @@ -15,15 +20,9 @@ pub mod units; #[cfg(all(unix, not(target_os = "macos")))] pub mod fcwrap; -use crate::locator::{new_locator, FontDataHandle, FontLocator, FontLocatorSelection}; pub use crate::rasterizer::RasterizedGlyph; -use crate::rasterizer::{new_rasterizer, FontRasterizer, FontRasterizerSelection}; -use crate::shaper::{new_shaper, FontShaper, FontShaperSelection}; pub use crate::shaper::{FallbackIdx, FontMetrics, GlyphInfo}; -use config::{configuration, ConfigHandle, TextStyle}; -use wezterm_term::CellAttributes; - pub struct LoadedFont { rasterizers: Vec>>>, handles: Vec, diff --git a/wezterm-font/src/rasterizer/mod.rs b/wezterm-font/src/rasterizer/mod.rs index 0ee71833d..02a5e6c6c 100644 --- a/wezterm-font/src/rasterizer/mod.rs +++ b/wezterm-font/src/rasterizer/mod.rs @@ -1,5 +1,6 @@ use crate::locator::FontDataHandle; use crate::units::*; +use config::FontRasterizerSelection; pub mod freetype; @@ -25,8 +26,6 @@ pub trait FontRasterizer { ) -> anyhow::Result; } -pub use config::FontRasterizerSelection; - pub fn new_rasterizer( rasterizer: FontRasterizerSelection, handle: &FontDataHandle,