pub struct Names<'a> {
source: Source<'a>,
}Expand description
Access to names in a font.
SFNT names come from the name table. For Type 1 fonts, the available
notice, family, weight, full, version, and PostScript names are exposed as
name IDs 0, 1, 2, 4, 5, and 6, respectively. A Type 1 Notice may contain
either copyright or trademark text; it is exposed as ID 0. The axes of a
multiple master font are named by IDs from 256, one per axis, which
Axis::name returns. Standalone CFF
fonts expose family, weight, full, and PostScript names as IDs 1, 2, 4,
and 6, and copyright, version, and notice as IDs 0, 5, and 7.
Fields§
§source: Source<'a>Implementations§
Source§impl<'a> Names<'a>
impl<'a> Names<'a>
Sourcepub fn from_sfnt(tables: &impl TableProvider<'a>) -> Names<'a>
pub fn from_sfnt(tables: &impl TableProvider<'a>) -> Names<'a>
Creates a name facade from an SFNT table provider.
Sourcepub fn from_type1(font: &'a Type1Font) -> Names<'a>
pub fn from_type1(font: &'a Type1Font) -> Names<'a>
Creates a name facade from a Type 1 font.
Sourcepub fn from_cff(font: &CffFontRef<'a>) -> Names<'a>
pub fn from_cff(font: &CffFontRef<'a>) -> Names<'a>
Creates a name facade from a standalone CFF font.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Names<'a>
impl<'a> RefUnwindSafe for Names<'a>
impl<'a> Send for Names<'a>
impl<'a> Sync for Names<'a>
impl<'a> Unpin for Names<'a>
impl<'a> UnsafeUnpin for Names<'a>
impl<'a> UnwindSafe for Names<'a>
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