pub struct FontEntry {
pub fontdb_id: ID,
pub face_index: u32,
pub swash_cache_key: CacheKey,
pub is_system: bool,
/* private fields */
}Fields§
§fontdb_id: ID§face_index: u32§swash_cache_key: CacheKey§is_system: boolTrue for faces discovered via the OS font enumeration. Glyph
fallback prefers explicitly-registered faces and only reaches for
system faces as a last resort (see
find_fallback_font).
Implementations§
Source§impl FontEntry
impl FontEntry
Sourcepub fn bytes(&self) -> &[u8] ⓘ
pub fn bytes(&self) -> &[u8] ⓘ
Borrow the underlying font bytes, loading them from disk on first
use for lazily-tracked system faces. Returns an empty slice if a
system font file can no longer be read (uninstalled mid-session);
shaping then degrades gracefully to None/.notdef.
Sourcepub fn shaper_data(&self, font: &FontRef<'_>) -> &ShaperData
pub fn shaper_data(&self, font: &FontRef<'_>) -> &ShaperData
Borrow this face’s shaping tables, building them on first use.
ShaperData::new reprocesses the font tables; doing it once per
face (instead of once per shape call) avoids redundant work on
every relayout/keystroke. The font must refer to this same
face — callers already hold a FontRef opened from bytes().
Auto Trait Implementations§
impl !Freeze for FontEntry
impl !RefUnwindSafe for FontEntry
impl !UnwindSafe for FontEntry
impl Send for FontEntry
impl Sync for FontEntry
impl Unpin for FontEntry
impl UnsafeUnpin for FontEntry
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