Struct write_fonts::tables::os2::SelectionFlags
source · pub struct SelectionFlags { /* private fields */ }Expand description
OS/2 selection flags
Implementations§
source§impl SelectionFlags
impl SelectionFlags
sourcepub const ITALIC: SelectionFlags = _
pub const ITALIC: SelectionFlags = _
Bit 0: Font contains italic or oblique glyphs, otherwise they are upright.
sourcepub const UNDERSCORE: SelectionFlags = _
pub const UNDERSCORE: SelectionFlags = _
Bit 1: Glyphs are underscored.
sourcepub const NEGATIVE: SelectionFlags = _
pub const NEGATIVE: SelectionFlags = _
Bit 2: Glyphs have their foreground and background reversed.
sourcepub const OUTLINED: SelectionFlags = _
pub const OUTLINED: SelectionFlags = _
Bit 3: Outline (hollow) glyphs, otherwise they are solid.
sourcepub const STRIKEOUT: SelectionFlags = _
pub const STRIKEOUT: SelectionFlags = _
Bit 4: Glyphs are overstruck.
sourcepub const BOLD: SelectionFlags = _
pub const BOLD: SelectionFlags = _
Bit 5: Glyphs are emboldened.
sourcepub const REGULAR: SelectionFlags = _
pub const REGULAR: SelectionFlags = _
Bit 6: Glyphs are in the standard weight/style for the font.
sourcepub const USE_TYPO_METRICS: SelectionFlags = _
pub const USE_TYPO_METRICS: SelectionFlags = _
Bit 7: If set, it is strongly recommended that applications use OS/2.sTypoAscender - OS/2.sTypoDescender + OS/2.sTypoLineGap as the default line spacing for this font.
sourcepub const WWS: SelectionFlags = _
pub const WWS: SelectionFlags = _
Bit 8: The font has ‘name’ table strings consistent with a weight/width/slope family without requiring use of name IDs 21 and 22.
sourcepub const OBLIQUE: SelectionFlags = _
pub const OBLIQUE: SelectionFlags = _
Bit 9: Font contains oblique glyphs.
source§impl SelectionFlags
impl SelectionFlags
sourcepub const fn empty() -> SelectionFlags
pub const fn empty() -> SelectionFlags
Returns an empty set of flags.
sourcepub const fn all() -> SelectionFlags
pub const fn all() -> SelectionFlags
Returns the set containing all flags.
sourcepub const fn from_bits(bits: u16) -> Option<SelectionFlags>
pub const fn from_bits(bits: u16) -> Option<SelectionFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u16) -> SelectionFlags
pub const fn from_bits_truncate(bits: u16) -> SelectionFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const fn intersects(&self, other: SelectionFlags) -> bool
pub const fn intersects(&self, other: SelectionFlags) -> bool
Returns true if there are flags common to both self and other.
sourcepub const fn contains(&self, other: SelectionFlags) -> bool
pub const fn contains(&self, other: SelectionFlags) -> bool
Returns true if all of the flags in other are contained within self.
sourcepub fn insert(&mut self, other: SelectionFlags)
pub fn insert(&mut self, other: SelectionFlags)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: SelectionFlags)
pub fn remove(&mut self, other: SelectionFlags)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: SelectionFlags)
pub fn toggle(&mut self, other: SelectionFlags)
Toggles the specified flags in-place.
sourcepub const fn intersection(self, other: SelectionFlags) -> SelectionFlags
pub const fn intersection(self, other: SelectionFlags) -> SelectionFlags
Returns the intersection between the flags in self and
other.
Specifically, the returned set contains only the flags which are
present in both self and other.
This is equivalent to using the & operator (e.g.
ops::BitAnd), as in flags & other.
sourcepub const fn union(self, other: SelectionFlags) -> SelectionFlags
pub const fn union(self, other: SelectionFlags) -> SelectionFlags
Returns the union of between the flags in self and other.
Specifically, the returned set contains all flags which are
present in either self or other, including any which are
present in both.
This is equivalent to using the | operator (e.g.
ops::BitOr), as in flags | other.
sourcepub const fn difference(self, other: SelectionFlags) -> SelectionFlags
pub const fn difference(self, other: SelectionFlags) -> SelectionFlags
Returns the difference between the flags in self and other.
Specifically, the returned set contains all flags present in
self, except for the ones present in other.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other (and this syntax is also supported).
This is equivalent to using the - operator (e.g.
ops::Sub), as in flags - other.
Trait Implementations§
source§impl Binary for SelectionFlags
impl Binary for SelectionFlags
source§impl BitAnd for SelectionFlags
impl BitAnd for SelectionFlags
source§fn bitand(self, other: SelectionFlags) -> SelectionFlags
fn bitand(self, other: SelectionFlags) -> SelectionFlags
Returns the intersection between the two sets of flags.
§type Output = SelectionFlags
type Output = SelectionFlags
& operator.source§impl BitAndAssign for SelectionFlags
impl BitAndAssign for SelectionFlags
source§fn bitand_assign(&mut self, other: SelectionFlags)
fn bitand_assign(&mut self, other: SelectionFlags)
Disables all flags disabled in the set.
source§impl BitOr for SelectionFlags
impl BitOr for SelectionFlags
source§fn bitor(self, other: SelectionFlags) -> SelectionFlags
fn bitor(self, other: SelectionFlags) -> SelectionFlags
Returns the union of the two sets of flags.
§type Output = SelectionFlags
type Output = SelectionFlags
| operator.source§impl BitOrAssign for SelectionFlags
impl BitOrAssign for SelectionFlags
source§fn bitor_assign(&mut self, other: SelectionFlags)
fn bitor_assign(&mut self, other: SelectionFlags)
Adds the set of flags.
source§impl BitXor for SelectionFlags
impl BitXor for SelectionFlags
source§fn bitxor(self, other: SelectionFlags) -> SelectionFlags
fn bitxor(self, other: SelectionFlags) -> SelectionFlags
Returns the left flags, but with all the right flags toggled.
§type Output = SelectionFlags
type Output = SelectionFlags
^ operator.source§impl BitXorAssign for SelectionFlags
impl BitXorAssign for SelectionFlags
source§fn bitxor_assign(&mut self, other: SelectionFlags)
fn bitxor_assign(&mut self, other: SelectionFlags)
Toggles the set of flags.
source§impl Clone for SelectionFlags
impl Clone for SelectionFlags
source§fn clone(&self) -> SelectionFlags
fn clone(&self) -> SelectionFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SelectionFlags
impl Debug for SelectionFlags
source§impl Default for SelectionFlags
impl Default for SelectionFlags
source§fn default() -> SelectionFlags
fn default() -> SelectionFlags
source§impl FontWrite for SelectionFlags
impl FontWrite for SelectionFlags
source§fn write_into(&self, writer: &mut TableWriter)
fn write_into(&self, writer: &mut TableWriter)
source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
source§impl Hash for SelectionFlags
impl Hash for SelectionFlags
source§impl LowerHex for SelectionFlags
impl LowerHex for SelectionFlags
source§impl Not for SelectionFlags
impl Not for SelectionFlags
source§fn not(self) -> SelectionFlags
fn not(self) -> SelectionFlags
Returns the complement of this set of flags.
§type Output = SelectionFlags
type Output = SelectionFlags
! operator.source§impl Octal for SelectionFlags
impl Octal for SelectionFlags
source§impl Ord for SelectionFlags
impl Ord for SelectionFlags
source§fn cmp(&self, other: &SelectionFlags) -> Ordering
fn cmp(&self, other: &SelectionFlags) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for SelectionFlags
impl PartialEq for SelectionFlags
source§fn eq(&self, other: &SelectionFlags) -> bool
fn eq(&self, other: &SelectionFlags) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for SelectionFlags
impl PartialOrd for SelectionFlags
source§fn partial_cmp(&self, other: &SelectionFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &SelectionFlags) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Scalar for SelectionFlags
impl Scalar for SelectionFlags
source§fn from_raw(raw: <SelectionFlags as Scalar>::Raw) -> SelectionFlags
fn from_raw(raw: <SelectionFlags as Scalar>::Raw) -> SelectionFlags
source§impl Sub for SelectionFlags
impl Sub for SelectionFlags
source§fn sub(self, other: SelectionFlags) -> SelectionFlags
fn sub(self, other: SelectionFlags) -> SelectionFlags
Returns the set difference of the two sets of flags.
§type Output = SelectionFlags
type Output = SelectionFlags
- operator.source§impl SubAssign for SelectionFlags
impl SubAssign for SelectionFlags
source§fn sub_assign(&mut self, other: SelectionFlags)
fn sub_assign(&mut self, other: SelectionFlags)
Disables all flags enabled in the set.
source§impl UpperHex for SelectionFlags
impl UpperHex for SelectionFlags
impl Copy for SelectionFlags
impl Eq for SelectionFlags
impl StructuralPartialEq for SelectionFlags
Auto Trait Implementations§
impl RefUnwindSafe for SelectionFlags
impl Send for SelectionFlags
impl Sync for SelectionFlags
impl Unpin for SelectionFlags
impl UnwindSafe for SelectionFlags
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.source§impl<T> FixedSize for Twhere
T: Scalar,
impl<T> FixedSize for Twhere
T: Scalar,
source§const RAW_BYTE_LEN: usize = _
const RAW_BYTE_LEN: usize = _
source§impl<T> FromObjRef<BigEndian<T>> for T
impl<T> FromObjRef<BigEndian<T>> for T
source§fn from_obj_ref(from: &BigEndian<T>, _: FontData<'_>) -> T
fn from_obj_ref(from: &BigEndian<T>, _: FontData<'_>) -> T
from to an instance of Self, using the provided data to resolve offsets.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
T, using the provided data to resolve any offsets.