pub struct FontFamilyKey(/* private fields */);Expand description
The identity an app-supplied typeface was registered under.
FontFamily::FileBacked and FontFamily::LoadedTypeface name a typeface by
its files rather than by a name inside the font, so resolution cannot
compare strings from the name table. Hashing the FontFamily value once
at registration and once per resolve keeps the two sides in step without
walking path lists on every frame.
Implementations§
Source§impl FontFamilyKey
impl FontFamilyKey
Sourcepub fn of(family: &FontFamily) -> Self
pub fn of(family: &FontFamily) -> Self
Returns the key of family, the same for equal families.
Trait Implementations§
Source§impl Clone for FontFamilyKey
impl Clone for FontFamilyKey
impl Copy for FontFamilyKey
Source§impl Debug for FontFamilyKey
impl Debug for FontFamilyKey
impl Eq for FontFamilyKey
Source§impl Hash for FontFamilyKey
impl Hash for FontFamilyKey
Source§impl PartialEq for FontFamilyKey
impl PartialEq for FontFamilyKey
impl StructuralPartialEq for FontFamilyKey
Auto Trait Implementations§
impl Forget for FontFamilyKey
impl Freeze for FontFamilyKey
impl Move for FontFamilyKey
impl RefUnwindSafe for FontFamilyKey
impl Send for FontFamilyKey
impl Sync for FontFamilyKey
impl Unpin for FontFamilyKey
impl UnsafeUnpin for FontFamilyKey
impl UnwindSafe for FontFamilyKey
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