pub struct AnalyticGlyphCache { /* private fields */ }Expand description
In-memory cache of parsed vector glyph contours.
Implementations§
Source§impl AnalyticGlyphCache
impl AnalyticGlyphCache
pub fn new() -> Self
pub fn insert(&mut self, glyph: AnalyticGlyph)
pub fn get(&self, char_code: char) -> Option<&AnalyticGlyph>
Sourcepub fn register_path_glyph(
&mut self,
char_code: char,
advance_width: f32,
path: &Path,
tolerance: f32,
)
pub fn register_path_glyph( &mut self, char_code: char, advance_width: f32, path: &Path, tolerance: f32, )
Registers a vector glyph from a Path.
Sourcepub fn evaluate_glyph_sdf(&self, char_code: char, point: Point2D) -> Option<f32>
pub fn evaluate_glyph_sdf(&self, char_code: char, point: Point2D) -> Option<f32>
Evaluates signed distance from a query pixel to the analytical glyph contours.
Sourcepub fn with_standard_ascii() -> Self
pub fn with_standard_ascii() -> Self
Returns an AnalyticGlyphCache pre-populated with analytical quadratic contours for ASCII.
Trait Implementations§
Source§impl Clone for AnalyticGlyphCache
impl Clone for AnalyticGlyphCache
Source§impl Debug for AnalyticGlyphCache
impl Debug for AnalyticGlyphCache
Auto Trait Implementations§
impl Forget for AnalyticGlyphCache
impl Freeze for AnalyticGlyphCache
impl Move for AnalyticGlyphCache
impl RefUnwindSafe for AnalyticGlyphCache
impl Send for AnalyticGlyphCache
impl Sync for AnalyticGlyphCache
impl Unpin for AnalyticGlyphCache
impl UnsafeUnpin for AnalyticGlyphCache
impl UnwindSafe for AnalyticGlyphCache
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