pub enum FontFallback {
Deny,
Explicit(String),
InjectStandard,
EmbedUnicode(UnicodeFont),
}Expand description
Font fallback policy. Fallback use is never silent: it is always visible
in the per-edit result (font_substituted).
Variants§
Deny
Fail with TextEditError::FontFallbackDenied (default).
Explicit(String)
Use the named font (must exist in the page resources).
InjectStandard
Inject a Helvetica/WinAnsiEncoding resource and use it.
Bounded by WinAnsi: nothing above U+00FF can be written this way.
EmbedUnicode(UnicodeFont)
Embed the caller-supplied font as a Type0/Identity-H composite font
and write the replacement through it.
This is the only policy that can write scripts the document never
contained — Polish, Greek, Cyrillic, CJK and so on — because the
reachable characters are those of the supplied font rather than of a
256-entry encoding. See crate::unicode_font.
The font is embedded (subsetted to the glyphs actually used), so the caller must hold a licence permitting embedding.
Trait Implementations§
Source§impl Clone for FontFallback
impl Clone for FontFallback
Source§impl Debug for FontFallback
impl Debug for FontFallback
impl Eq for FontFallback
Source§impl PartialEq for FontFallback
impl PartialEq for FontFallback
Source§impl Serialize for FontFallback
impl Serialize for FontFallback
impl StructuralPartialEq for FontFallback
Auto Trait Implementations§
impl Freeze for FontFallback
impl RefUnwindSafe for FontFallback
impl Send for FontFallback
impl Sync for FontFallback
impl Unpin for FontFallback
impl UnsafeUnpin for FontFallback
impl UnwindSafe for FontFallback
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.