pub enum FaceEncoding {
Unicode,
Latin1,
AppleRoman,
AdobeCustom,
Symbol,
Other,
}Expand description
The fxge-level encodings a font face’s charmap may declare, which are a
different set from FontEncoding and are reverse-mapped through the raw
tables (CharCodeFromUnicodeForEncoding, the former working note).
Variants§
Unicode
The charmap is Unicode: a code is its character.
Latin1
Latin-1, read through the WinAnsi table. The standard-14 encoder in
pdfrum-edit (EmbeddedFont::encode) is its production caller.
AppleRoman
Apple Roman, read through the MacRoman table.
AdobeCustom
Adobe custom, read through the PDFDoc table.
Symbol
Microsoft symbol.
Other
Anything else: reverse lookup always yields 0.
Implementations§
Source§impl FaceEncoding
impl FaceEncoding
Sourcepub fn charcode_from_unicode(self, unicode: u16) -> u32
pub fn charcode_from_unicode(self, unicode: u16) -> u32
Find the character code this face encoding gives unicode, or 0.
A linear scan returning the first index, and 0 on a miss — which
is indistinguishable from a real hit at code 0, exactly as PDF_FindCode
leaves it. Callers test != 0, so code 0 is unreachable through this
route by construction.
Trait Implementations§
Source§impl Clone for FaceEncoding
impl Clone for FaceEncoding
Source§fn clone(&self) -> FaceEncoding
fn clone(&self) -> FaceEncoding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more