pub enum MetricInvalidation {
FontLoaded,
DprChanged,
ZoomChanged,
ContainerResized,
FontSizeChanged,
FullReset,
}Expand description
Reason for a font metric recomputation.
Each variant triggers a specific set of cache invalidations.
Variants§
FontLoaded
Web font finished loading, metrics may have changed.
DprChanged
Device pixel ratio changed (e.g., window moved between monitors).
ZoomChanged
User zoom level changed.
ContainerResized
Container was resized (may affect fit, not metrics themselves).
FontSizeChanged
Font size explicitly changed by user or configuration.
FullReset
Full metric reset requested (e.g., after error recovery).
Implementations§
Source§impl MetricInvalidation
impl MetricInvalidation
Sourcepub fn requires_rasterization(&self) -> bool
pub fn requires_rasterization(&self) -> bool
Whether this invalidation requires recomputing glyph rasterization.
DPR and font size changes affect pixel output; container resize does not.
Sourcepub fn requires_refit(&self) -> bool
pub fn requires_refit(&self) -> bool
Whether this invalidation requires recomputing grid dimensions.
Trait Implementations§
Source§impl Clone for MetricInvalidation
impl Clone for MetricInvalidation
Source§fn clone(&self) -> MetricInvalidation
fn clone(&self) -> MetricInvalidation
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 moreSource§impl Debug for MetricInvalidation
impl Debug for MetricInvalidation
Source§impl Display for MetricInvalidation
impl Display for MetricInvalidation
Source§impl Hash for MetricInvalidation
impl Hash for MetricInvalidation
Source§impl PartialEq for MetricInvalidation
impl PartialEq for MetricInvalidation
impl Copy for MetricInvalidation
impl Eq for MetricInvalidation
impl StructuralPartialEq for MetricInvalidation
Auto Trait Implementations§
impl Freeze for MetricInvalidation
impl RefUnwindSafe for MetricInvalidation
impl Send for MetricInvalidation
impl Sync for MetricInvalidation
impl Unpin for MetricInvalidation
impl UnsafeUnpin for MetricInvalidation
impl UnwindSafe for MetricInvalidation
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