-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
There are a lot of CJK CMaps, but some of them are just Utf16-BE. We can check the prefix of unknown encoding and treat the encoding begin with Uni as Utf16-BE.
Here are some information from pdf v1.5 spec p404


// fontentry.rs
let source_encoding = match base_encoding {
Some(BaseEncoding::StandardEncoding) => Some(Encoding::AdobeStandard),
Some(BaseEncoding::SymbolEncoding) => Some(Encoding::AdobeSymbol),
Some(BaseEncoding::WinAnsiEncoding) => Some(Encoding::WinAnsiEncoding),
Some(BaseEncoding::MacRomanEncoding) => Some(Encoding::MacRomanEncoding),
Some(BaseEncoding::MacExpertEncoding) => Some(Encoding::AdobeExpert),
ref e => {
// we can do the check here, return AdobeStandard if matches.
warn!("unsupported pdf encoding {:?}", e);
None
}
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels