pub struct Encoding { /* private fields */ }Expand description
An encoding that can map character codes to Unicode strings.
Implementations§
Source§impl Encoding
impl Encoding
Sourcepub fn standard() -> Self
pub fn standard() -> Self
Create StandardEncoding (Adobe’s standard encoding for Type 1 fonts).
Sourcepub fn zapf_dingbats() -> Self
pub fn zapf_dingbats() -> Self
Create ZapfDingbats encoding.
ZapfDingbats uses its own character set where ASCII letters map to various symbols (arrows, stars, diamonds, etc.).
Sourcepub fn apply_differences(&mut self, differences: &[PdfObject])
pub fn apply_differences(&mut self, differences: &[PdfObject])
Apply a Differences array to modify this encoding.
Sourcepub fn decode_char(&self, code: u8) -> Option<&str>
pub fn decode_char(&self, code: u8) -> Option<&str>
Map a character code to a Unicode string.
Sourcepub fn decode_bytes(&self, data: &[u8]) -> String
pub fn decode_bytes(&self, data: &[u8]) -> String
Decode a byte sequence to a Unicode string.
Trait Implementations§
Auto Trait Implementations§
impl Freeze 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