1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 12:23:46 +03:00

font: tidy up imports/exports a bit

This commit is contained in:
Wez Furlong 2020-11-08 10:19:45 -08:00
parent cb6b1496bf
commit 72492c1517
2 changed files with 8 additions and 10 deletions

View File

@ -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<RefCell<Option<Box<dyn FontRasterizer>>>>,
handles: Vec<FontDataHandle>,

View File

@ -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<RasterizedGlyph>;
}
pub use config::FontRasterizerSelection;
pub fn new_rasterizer(
rasterizer: FontRasterizerSelection,
handle: &FontDataHandle,