Skip to main content

ParleyShaper

Struct ParleyShaper 

Source
pub struct ParleyShaper { /* private fields */ }

Implementations§

Source§

impl ParleyShaper

Source§

impl ParleyShaper

Source

pub fn new() -> Self

Source

pub fn system_fonts_enabled(&self) -> bool

Source

pub fn set_default_locale(&mut self, locale_bcp47: Option<String>) -> bool

Source

pub fn set_common_fallback_stack_suffix(&mut self, suffix: String) -> bool

Source

pub fn common_fallback_stack_suffix(&self) -> &str

Source

pub fn all_font_names(&mut self) -> Vec<String>

Source

pub fn all_font_catalog_entries(&mut self) -> Vec<FontCatalogEntryMetadata>

Source

pub fn resolve_family_id(&mut self, name: &str) -> Option<FamilyId>

Source

pub fn family_name_for_id(&mut self, id: FamilyId) -> Option<String>

Source

pub fn generic_family_ids(&mut self, generic: GenericFamily) -> Vec<FamilyId>

Source

pub fn set_generic_family_ids( &mut self, generic: GenericFamily, ids: &[FamilyId], ) -> bool

Source

pub fn add_fonts(&mut self, fonts: impl IntoIterator<Item = Vec<u8>>) -> usize

Source

pub fn for_each_font_environment_blob( &mut self, f: impl FnMut(FontEnvironmentBlobRef<'_>), )

Source

pub fn system_font_rescan_seed(&self) -> Option<SystemFontRescanSeed>

Source

pub fn apply_system_font_rescan_result( &mut self, result: SystemFontRescanResult, ) -> bool

Source

pub fn shape_single_line( &mut self, input: TextInputRef<'_>, scale: f32, ) -> ShapedLineLayout

Source

pub fn shape_paragraph_word_wrap( &mut self, input: TextInputRef<'_>, max_width_px: f32, scale: f32, ) -> Vec<(Range<usize>, ShapedLineLayout)>

Source

pub fn shape_paragraph_word_break_wrap( &mut self, input: TextInputRef<'_>, max_width_px: f32, scale: f32, ) -> Vec<(Range<usize>, ShapedLineLayout)>

Source

pub fn shape_paragraph_word_wrap_metrics( &mut self, input: TextInputRef<'_>, max_width_px: f32, scale: f32, ) -> Vec<(Range<usize>, ShapedLineLayout)>

Source

pub fn shape_paragraph_word_break_wrap_metrics( &mut self, input: TextInputRef<'_>, max_width_px: f32, scale: f32, ) -> Vec<(Range<usize>, ShapedLineLayout)>

Source

pub fn shape_single_line_metrics( &mut self, input: TextInputRef<'_>, scale: f32, ) -> ShapedLineLayout

Trait Implementations§

Source§

impl Default for ParleyShaper

Source§

fn default() -> ParleyShaper

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.