Skip to main content

StrikeRef

Type Alias StrikeRef 

pub type StrikeRef = Handle<SkStrikeRef>;
Expand description

StrikeRef is a lightweight, thread-safe handle to a resolved font strike.

It caches the result of looking up an SkStrike for a particular crate::Font configuration, allowing repeated glyph metric queries (advances, bounds) without the overhead of descriptor construction, hashing, and global cache lookup on each call.

Obtain an StrikeRef from crate::Font::make_strike_ref(). The returned object remains valid as long as it is held; the underlying SkStrike is atomically reference counted.

StrikeRef does not track changes to the crate::Font it was created from. If the crate::Font’s properties change (size, typeface, hinting, etc.), a new StrikeRef must be obtained.

Aliased Type§

pub struct StrikeRef(/* private fields */);