pub struct CollectedFontStacks {
pub font_stacks: Vec<Vec<FontSelector>>,
pub hash_to_index: HashMap<u64, usize>,
pub font_refs: HashMap<usize, FontRef>,
}Expand description
Result of collecting font stacks from a StyledDom Contains all unique font stacks and the mapping from StyleFontFamiliesHash to FontChainKey
Fields§
§font_stacks: Vec<Vec<FontSelector>>All unique font stacks found in the document (system/file fonts via fontconfig)
hash_to_index: HashMap<u64, usize>Map from the font stack hash to the index in font_stacks
font_refs: HashMap<usize, FontRef>Direct FontRefs that bypass fontconfig (e.g., embedded icon fonts) These are keyed by their pointer address for uniqueness
Trait Implementations§
Source§impl Clone for CollectedFontStacks
impl Clone for CollectedFontStacks
Source§fn clone(&self) -> CollectedFontStacks
fn clone(&self) -> CollectedFontStacks
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CollectedFontStacks
impl RefUnwindSafe for CollectedFontStacks
impl Send for CollectedFontStacks
impl Sync for CollectedFontStacks
impl Unpin for CollectedFontStacks
impl UnwindSafe for CollectedFontStacks
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more