pub struct TextEngine { /* private fields */ }Implementations§
Source§impl TextEngine
impl TextEngine
pub fn set_fallbacks( &mut self, primary: &str, weight: Option<u16>, faces: &[Fallback], ) -> Result<(), Error>
pub fn families(&self) -> Vec<String>
pub fn face_metrics(&mut self, family: &str, weight: u16) -> Option<FaceMetrics>
pub fn picks(&mut self, span: &Span) -> Vec<Pick>
Source§impl TextEngine
impl TextEngine
pub fn place_number( &mut self, span: &Span, chars: &str, anchor: Anchor, placement: &Placement, ) -> Result<Placed, Error>
pub fn place_number_with( &mut self, span: &Span, chars: &str, forms: NumberForms, anchor: Anchor, placement: &Placement, ) -> Result<Placed, Error>
pub fn cached_number_faces(&self) -> usize
pub fn ligating_pairs( &mut self, face: &Face, chars: &str, forms: NumberForms, scale: f32, ) -> Result<Vec<(char, char)>, Error>
Source§impl TextEngine
impl TextEngine
Source§impl TextEngine
impl TextEngine
pub fn print_spans( &mut self, image: &mut PrintImage, block: &PrintBlock<'_>, ) -> Result<Printed, Error>
Source§impl TextEngine
impl TextEngine
pub fn new(font_bytes: &[u8]) -> Result<Self, Error>
pub fn register_font(&mut self, font_bytes: &[u8]) -> Result<(), Error>
pub fn begin_frame(&mut self)
pub fn end_frame(&mut self)
pub fn set_shaping_budget(&mut self, bytes: u64)
pub fn shaping_stats(&self) -> ShapingStats
pub fn cached_atlases(&self) -> usize
pub fn set_atlas_budget(&mut self, bytes: u64)
pub fn set_atlas_page(&mut self, size: u32) -> Result<(), Error>
pub fn atlas_stats(&self) -> AtlasStats
pub fn take_atlas_changes(&mut self) -> AtlasChanges
pub fn atlas_page(&self, id: u32) -> Option<&Atlas>
pub fn cached_blocks(&self) -> usize
pub fn cached_rasters(&self) -> usize
pub fn layout_spans( &mut self, spans: &[Span], width: Option<f32>, scale: f32, anchor: Anchor, ) -> Result<&Block, Error>
pub fn render_spans( &mut self, spans: &[Span], width: Option<f32>, scale: f32, anchor: Anchor, representation: Representation, origin: [f32; 2], alpha: f32, clip: [f32; 4], turn: [f32; 3], ) -> Result<RichParagraph, Error>
pub fn place_spans( &mut self, spans: &[Span], width: Option<f32>, anchor: Anchor, placement: &Placement, ) -> Result<Placed, Error>
pub fn layout( &mut self, text: &str, style: Style<'_>, baseline: &Baseline, ) -> Result<Paragraph, Error>
Auto Trait Implementations§
impl !Freeze for TextEngine
impl !RefUnwindSafe for TextEngine
impl Send for TextEngine
impl Sync for TextEngine
impl Unpin for TextEngine
impl UnsafeUnpin for TextEngine
impl !UnwindSafe for TextEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more