pub struct MacFontAdapter<D: MacBridgeDriver> { /* private fields */ }Expand description
Safe platform font adapter translating CoreText / CoreGraphics records into shared text runs.
Implementations§
Source§impl<D: MacBridgeDriver> MacFontAdapter<D>
impl<D: MacBridgeDriver> MacFontAdapter<D>
Sourcepub fn with_config(driver: D, config: MacFontAdapterConfig) -> Self
pub fn with_config(driver: D, config: MacFontAdapterConfig) -> Self
Create a new Mac font adapter with explicit configuration.
Sourcepub fn config(&self) -> &MacFontAdapterConfig
pub fn config(&self) -> &MacFontAdapterConfig
Retrieve a reference to the active configuration.
Sourcepub fn get_glyph_rgba_raster(
&self,
font_postscript_name: &str,
glyph_id: u16,
font_size_px: f32,
) -> Result<Option<RawCoreGraphicsRaster>, MacFontAdapterError>
pub fn get_glyph_rgba_raster( &self, font_postscript_name: &str, glyph_id: u16, font_size_px: f32, ) -> Result<Option<RawCoreGraphicsRaster>, MacFontAdapterError>
Rasterize a glyph through CoreGraphics, returning validated RGBA8 pixels.
Trait Implementations§
Source§impl<D: MacBridgeDriver> NativeShapingRoute for MacFontAdapter<D>
impl<D: MacBridgeDriver> NativeShapingRoute for MacFontAdapter<D>
Source§fn route_kind(&self) -> ShapingRouteKind
fn route_kind(&self) -> ShapingRouteKind
Return the route classification.
Source§fn capabilities(&self) -> ShapingRouteCapabilities
fn capabilities(&self) -> ShapingRouteCapabilities
Return declared capability parameters and operational limits.
Source§fn shape_run(
&self,
req: &NativeShapingRequest<'_>,
) -> Result<OwnedTextRun, NativeShapingError>
fn shape_run( &self, req: &NativeShapingRequest<'_>, ) -> Result<OwnedTextRun, NativeShapingError>
Shape a slice of text into an owned text run.
Auto Trait Implementations§
impl<D> Freeze for MacFontAdapter<D>where
D: Freeze,
impl<D> RefUnwindSafe for MacFontAdapter<D>where
D: RefUnwindSafe,
impl<D> Send for MacFontAdapter<D>
impl<D> Sync for MacFontAdapter<D>
impl<D> Unpin for MacFontAdapter<D>where
D: Unpin,
impl<D> UnsafeUnpin for MacFontAdapter<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for MacFontAdapter<D>where
D: UnwindSafe,
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