diff --git a/parley/src/editing/editor.rs b/parley/src/editing/editor.rs index ad095a60a..31a260fce 100644 --- a/parley/src/editing/editor.rs +++ b/parley/src/editing/editor.rs @@ -996,6 +996,15 @@ where self.layout_dirty = true; } + /// Get the current scale for the layout. + pub fn get_scale(&self) -> f32 { + self.scale + } + + pub fn get_font_size(&self) -> f32 { + self.font_size + } + /// Set whether to quantize the layout coordinates. /// /// Set `quantize` as `true` to have the layout coordinates aligned to pixel boundaries. @@ -1026,6 +1035,11 @@ where &mut self.default_style } + /// Get the current default styles for this editor. + pub fn get_styles(&self) -> &StyleSet { + &self.default_style + } + /// Whether the editor is currently in IME composing mode. pub fn is_composing(&self) -> bool { self.compose.is_some()