Struct owned_ttf_parser::os2::Table
source · pub struct Table<'a> {
pub version: u8,
data: &'a [u8],
}
Expand description
Fields§
§version: u8
Table version.
data: &'a [u8]
Implementations§
source§impl<'a> Table<'a>
impl<'a> Table<'a>
sourcepub fn permissions(&self) -> Option<Permissions>
pub fn permissions(&self) -> Option<Permissions>
Returns face permissions.
Returns None
in case of a malformed value.
sourcepub fn is_subsetting_allowed(&self) -> bool
pub fn is_subsetting_allowed(&self) -> bool
Checks if the face allows embedding a subset, further restricted by Self::permissions
.
sourcepub fn is_outline_embedding_allowed(&self) -> bool
pub fn is_outline_embedding_allowed(&self) -> bool
Checks if the face allows outline data to be embedded.
If false, only bitmaps may be embedded in accordance with Self::permissions
.
If the font contains no bitmaps and this flag is not set, it implies no embedding is allowed.
sourcepub fn subscript_metrics(&self) -> ScriptMetrics
pub fn subscript_metrics(&self) -> ScriptMetrics
Returns subscript metrics.
sourcepub fn superscript_metrics(&self) -> ScriptMetrics
pub fn superscript_metrics(&self) -> ScriptMetrics
Returns superscript metrics.
sourcepub fn strikeout_metrics(&self) -> LineMetrics
pub fn strikeout_metrics(&self) -> LineMetrics
Returns strikeout metrics.
sourcepub fn unicode_ranges(&self) -> UnicodeRanges
pub fn unicode_ranges(&self) -> UnicodeRanges
Returns Unicode ranges.
sourcepub fn is_bold(&self) -> bool
pub fn is_bold(&self) -> bool
Checks if face is bold.
Do not confuse with Weight::Bold
.
sourcepub fn use_typographic_metrics(&self) -> bool
pub fn use_typographic_metrics(&self) -> bool
Checks if typographic metrics should be used.
sourcepub fn typographic_ascender(&self) -> i16
pub fn typographic_ascender(&self) -> i16
Returns typographic ascender.
sourcepub fn typographic_descender(&self) -> i16
pub fn typographic_descender(&self) -> i16
Returns typographic descender.
sourcepub fn typographic_line_gap(&self) -> i16
pub fn typographic_line_gap(&self) -> i16
Returns typographic line gap.
sourcepub fn windows_ascender(&self) -> i16
pub fn windows_ascender(&self) -> i16
Returns Windows ascender.
sourcepub fn windows_descender(&self) -> i16
pub fn windows_descender(&self) -> i16
Returns Windows descender.
sourcepub fn capital_height(&self) -> Option<i16>
pub fn capital_height(&self) -> Option<i16>
Returns capital height.
Returns None
version is < 2.
Trait Implementations§
impl<'a> Copy for Table<'a>
Auto Trait Implementations§
impl<'a> Freeze for Table<'a>
impl<'a> RefUnwindSafe for Table<'a>
impl<'a> Send for Table<'a>
impl<'a> Sync for Table<'a>
impl<'a> Unpin for Table<'a>
impl<'a> UnwindSafe for Table<'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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)