pub(crate) struct FontInfo {Show 13 fields
pub font: FontRef,
pub bidi_level: Level,
pub language: Language,
pub letter_spacing: Option<Au>,
pub word_spacing: Option<Au>,
pub text_rendering: T,
pub kerning: T,
pub ligatures: FontVariantLigatures,
pub numeric: FontVariantNumeric,
pub east_asian: FontVariantEastAsian,
pub feature_settings: FontFeatureSettings,
pub position: T,
pub alternates: ResolvedFontVariantAlternates,
}Expand description
A data structure which contains information used when shaping a TextRunSegment.
Fields§
§font: FontRefThe font used when shaping a TextRunSegment.
bidi_level: LevelThe BiDi Level used when shaping a TextRunSegment.
language: LanguageThe Language used when shaping a TextRunSegment.
letter_spacing: Option<Au>Spacing to add between each letter. Corresponds to the CSS 2.1 letter-spacing property.
Letter spacing is not applied to all characters. Use [Self::letter_spacing_for_character] to determine the amount of spacing to apply.
word_spacing: Option<Au>Spacing to add between each word. Corresponds to the CSS 2.1 word-spacing property.
text_rendering: TThe TextRendering value from the original style.
kerning: TThe value of the font-kerning property from the original style.
ligatures: FontVariantLigaturesThe value of the font-variant-ligatures property from the original style.
numeric: FontVariantNumericThe value of the font-variant-numeric property from the original style.
east_asian: FontVariantEastAsianThe value of the font-variant-east-asian property from the original style.
feature_settings: FontFeatureSettingsThe value of the font-feature-settings property from the original style.
position: TThe value of the font-variant-position property from the original style.
alternates: ResolvedFontVariantAlternatesThe value of the font-variant-alternates property from the original style.
Any alternate names are already resolved at this point.
Implementations§
Trait Implementations§
Source§impl MallocSizeOf for FontInfo
impl MallocSizeOf for FontInfo
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
impl StructuralPartialEq for FontInfo
Auto Trait Implementations§
impl Freeze for FontInfo
impl !RefUnwindSafe for FontInfo
impl Send for FontInfo
impl Sync for FontInfo
impl Unpin for FontInfo
impl UnsafeUnpin for FontInfo
impl !UnwindSafe for FontInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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