pub struct GlyphCoverage {
total_unique: usize,
covered: usize,
missing_chars: Vec<char>,
}Expand description
Statistics about glyph coverage for a given text.
This struct provides information about how well a font supports the characters in a text string, useful for determining if font fallbacks are needed.
Fields§
§total_unique: usizeTotal number of unique characters in the analyzed text
covered: usizeNumber of characters that have glyphs in the font
missing_chars: Vec<char>List of characters that are missing from the font
Implementations§
Source§impl GlyphCoverage
impl GlyphCoverage
Sourcepub fn coverage_percent(&self) -> f32
pub fn coverage_percent(&self) -> f32
Returns the percentage of characters covered by the font (0-100).
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true if all characters are covered (100% coverage).
Sourcepub fn missing_chars(&self) -> &[char]
pub fn missing_chars(&self) -> &[char]
Returns the list of missing characters.
Sourcepub fn covered_count(&self) -> usize
pub fn covered_count(&self) -> usize
Returns the number of covered characters.
Sourcepub fn total_count(&self) -> usize
pub fn total_count(&self) -> usize
Returns the total number of unique characters analyzed.
Trait Implementations§
Source§impl Clone for GlyphCoverage
impl Clone for GlyphCoverage
Source§fn clone(&self) -> GlyphCoverage
fn clone(&self) -> GlyphCoverage
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 GlyphCoverage
impl RefUnwindSafe for GlyphCoverage
impl Send for GlyphCoverage
impl Sync for GlyphCoverage
impl Unpin for GlyphCoverage
impl UnwindSafe for GlyphCoverage
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.