pub struct ScriptRequirement { /* private fields */ }Expand description
One resolved script requirement: an OpenType tag group plus an optional
Unicode script. Built by resolve_scripts.
Implementations§
Source§impl ScriptRequirement
impl ScriptRequirement
The OpenType tag group; any one present in the font satisfies the OT path.
Sourcepub fn unicode_script(&self) -> Option<Script>
pub fn unicode_script(&self) -> Option<Script>
The Unicode script the font’s cmap must cover, if any.
Sourcepub fn ot_satisfied(&self, font_scripts: &HashSet<Tag>) -> bool
pub fn ot_satisfied(&self, font_scripts: &HashSet<Tag>) -> bool
Whether the font’s GSUB/GPOS script tags satisfy the OpenType path.
Sourcepub fn unicode_satisfied<I>(&self, codepoints: I) -> boolwhere
I: IntoIterator<Item = char>,
pub fn unicode_satisfied<I>(&self, codepoints: I) -> boolwhere
I: IntoIterator<Item = char>,
Whether the given codepoints cover this requirement’s Unicode script.
Returns false when the input mapped to no Unicode script. Otherwise,
counts codepoints belonging to that script and stops early once
MIN_UNICODE_COVERAGE is reached.
Trait Implementations§
Source§impl Clone for ScriptRequirement
impl Clone for ScriptRequirement
Source§fn clone(&self) -> ScriptRequirement
fn clone(&self) -> ScriptRequirement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ScriptRequirement
impl RefUnwindSafe for ScriptRequirement
impl Send for ScriptRequirement
impl Sync for ScriptRequirement
impl Unpin for ScriptRequirement
impl UnsafeUnpin for ScriptRequirement
impl UnwindSafe for ScriptRequirement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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