pub struct GlyphData { /* private fields */ }Expand description
A queryable set of glyph data
Always queries static data from glyphsLib. Optionally includes a set of override values as well.
Default/no overrides instances are cheap. Instances created with overrides are more expensive.
Implementations§
Source§impl GlyphData
impl GlyphData
Sourcepub fn with_override_file(override_file: &Path) -> Result<Self, GlyphDataError>
pub fn with_override_file(override_file: &Path) -> Result<Self, GlyphDataError>
Create a new data set with user provided overrides
Source§impl GlyphData
impl GlyphData
Sourcepub fn query(
&self,
name: &str,
codepoints: Option<&BTreeSet<u32>>,
) -> Option<QueryResult>
pub fn query( &self, name: &str, codepoints: Option<&BTreeSet<u32>>, ) -> Option<QueryResult>
Get the info for the given name/codepoints, attempting to synthesize it if necessary
Returns, from most to least preferred:
- The matching override value
- The matching value from bundled data
- A computed value based on name heuristics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GlyphData
impl RefUnwindSafe for GlyphData
impl Send for GlyphData
impl Sync for GlyphData
impl Unpin for GlyphData
impl UnwindSafe for GlyphData
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<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§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.