Re-export font_kit primitives from a new fonts module

...also, rename the old `fonts` to `font_cache`.
This commit is contained in:
Antonio Scandurra
2021-03-25 10:58:33 +01:00
parent 0906b2a2f4
commit 0f6927eb4b
10 changed files with 169 additions and 171 deletions
+2 -5
View File
@@ -1,5 +1,5 @@
use crate::{
fonts::{FontId, GlyphId},
fonts::{FontId, GlyphId, Metrics, Properties},
geometry::{
rect::{RectF, RectI},
transform2d::Transform2F,
@@ -19,10 +19,7 @@ use core_graphics::{
base::CGGlyph, color_space::CGColorSpace, context::CGContext, geometry::CGAffineTransform,
};
use core_text::{line::CTLine, string_attributes::kCTFontAttributeName};
use font_kit::{
canvas::RasterizationOptions, hinting::HintingOptions, metrics::Metrics,
properties::Properties, source::SystemSource,
};
use font_kit::{canvas::RasterizationOptions, hinting::HintingOptions, source::SystemSource};
use parking_lot::RwLock;
use std::{char, convert::TryFrom};
+1 -2
View File
@@ -8,7 +8,7 @@ pub mod current {
use crate::{
executor,
fonts::{FontId, GlyphId},
fonts::{FontId, GlyphId, Metrics as FontMetrics, Properties as FontProperties},
geometry::{
rect::{RectF, RectI},
vector::Vector2F,
@@ -19,7 +19,6 @@ use crate::{
use anyhow::Result;
use async_task::Runnable;
pub use event::Event;
use font_kit::{metrics::Metrics as FontMetrics, properties::Properties as FontProperties};
use std::{ops::Range, path::PathBuf, rc::Rc, sync::Arc};
pub trait Runner {