pub enum BoldSource {
FontName,
FontFlags,
WeightClass,
Painted,
}Expand description
Where TextItem::is_bold came from.
The extraction reads bold from several places and reports the first of
them, in this order, that says the text is bold; TextItem::bold_source
carries it so a caller can tell a face whose name says bold apart from
one whose weight class does, and both from text merely stroked to look
heavier.
Variants§
FontName
A bold word or foundry style abbreviation in the font name (“Bold”,
“-Bd”, “Black”, “Demi”, “-Hv”, “W7”; see
is_bold_font).
FontFlags
The FontDescriptor’s ForceBold flag, or the embedded font program’s
own bold selection (OS/2 fsSelection, the head table’s
macStyle).
WeightClass
The weight class: TextItem::font_weight at or above the threshold
of PositionOptions::bold_from_weight.
Painted
Text filled and stroked to look heavier (render mode 2 or 6 with a visible stroke of the fill colour) in a face that is not bold itself.
Implementations§
Trait Implementations§
Source§impl Clone for BoldSource
impl Clone for BoldSource
impl Copy for BoldSource
Source§impl Debug for BoldSource
impl Debug for BoldSource
impl Eq for BoldSource
Source§impl Hash for BoldSource
impl Hash for BoldSource
Source§impl PartialEq for BoldSource
impl PartialEq for BoldSource
impl StructuralPartialEq for BoldSource
Auto Trait Implementations§
impl Freeze for BoldSource
impl RefUnwindSafe for BoldSource
impl Send for BoldSource
impl Sync for BoldSource
impl Unpin for BoldSource
impl UnsafeUnpin for BoldSource
impl UnwindSafe for BoldSource
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more