pub struct Encoding { /* private fields */ }Expand description
A simple font’s code → character table, one entry per byte.
Implementations§
Source§impl Encoding
impl Encoding
Sourcepub fn standard() -> Self
pub fn standard() -> Self
StandardEncoding: ASCII with the two quote glyphs in their Adobe
positions (§D.2).
Sourcepub fn from_name(name: &[u8]) -> Self
pub fn from_name(name: &[u8]) -> Self
A base encoding by its /Encoding name; unknown names fall back to
StandardEncoding.
Sourcepub fn from_object(object: Option<&Object>) -> Result<Self>
pub fn from_object(object: Option<&Object>) -> Result<Self>
Build the encoding of a font dictionary’s /Encoding entry.
None means the font has no /Encoding and gets StandardEncoding.
Indirect values must be resolved by the caller; /Differences arrays
must be resolved too and can be applied with
Encoding::apply_differences.
Sourcepub fn apply_differences(&mut self, items: &[Object]) -> Result<()>
pub fn apply_differences(&mut self, items: &[Object]) -> Result<()>
Apply a /Differences array: code numbers followed by glyph names.
Trait Implementations§
impl Eq for Encoding
impl StructuralPartialEq for Encoding
Auto Trait Implementations§
impl Forget for Encoding
impl Freeze for Encoding
impl Move for Encoding
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnsafeUnpin for Encoding
impl UnwindSafe for Encoding
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