Checkpoint

This commit is contained in:
Nathan Sobo 2023-09-27 21:14:09 -06:00
parent 49672bfc5f
commit 9fefb1d898
10 changed files with 305 additions and 490 deletions

View file

@ -156,8 +156,8 @@ pub trait PlatformDispatcher: Send + Sync {
pub trait PlatformTextSystem: Send + Sync {
fn add_fonts(&self, fonts: &[Arc<Vec<u8>>]) -> Result<()>;
fn all_font_families(&self) -> Vec<String>;
fn select_font(&self, descriptor: Font) -> Result<FontId>;
fn font_metrics(&self, font_id: FontId) -> Arc<FontMetrics>;
fn font_id(&self, descriptor: &Font) -> Result<FontId>;
fn font_metrics(&self, font_id: FontId) -> FontMetrics;
fn typographic_bounds(&self, font_id: FontId, glyph_id: GlyphId) -> Result<Bounds<f32>>;
fn advance(&self, font_id: FontId, glyph_id: GlyphId) -> Result<Size<f32>>;
fn glyph_for_char(&self, font_id: FontId, ch: char) -> Option<GlyphId>;