FerroTextMeasurerFactory
struct · ferroui-pretext-media · v0.5.0
struct FerroTextMeasurerFactory
Connects Pretext to the application's configured FerroUI text services.
Instances are UI-thread-affine and belong to their font-service scope. If that scope is replaced, creation/shaping returns an error; create a new factory for the new scope. Replacing a Pretext engine's backend does not invalidate the native services retained by an existing prepared shaper.
Members
try_current
fn try_current() -> Result<Self, PretextError>
Resolves the configured native services without panicking when the application has not installed a font manager or text shaper.
with_culture
fn with_culture(self: Self, culture: Locale) -> Self
Selects the culture used by native font fallback and shaping.
create_layout
fn create_layout(self: &Self) -> PretextLayout
Creates an engine sharing this backend for measurement and shaping.
create_text_service
fn create_text_service(self: &Self, font: &str) -> Result<Rc<FerroTextService>, PretextError>
Creates a concrete service for direct native drawing as well as the portable measurement/shaping contracts.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedClassDefaultsErasedDestructorIntoEitherCloneIPretextTextMeasurerFactoryIPretextTextShaperFactory
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.