pub struct CharmapId {
pub platform: u16,
pub encoding: u16,
}Expand description
A charmap’s (platform, encoding) identity, as the cmap table declares
it.
PDFium compares these pairs literally — (3,1) for Windows Unicode,
(3,0) for Windows Symbol, (1,0) for Mac Roman — and the order it
prefers them in flips with the symbolic flag, so the pairs have to survive
as data rather than being collapsed into a “best charmap”.
Fields§
§platform: u16The cmap platform ID.
encoding: u16The cmap encoding ID, whose meaning depends on the platform.
Implementations§
Source§impl CharmapId
impl CharmapId
Sourcepub const WINDOWS_UNICODE: Self
pub const WINDOWS_UNICODE: Self
Windows Unicode BMP — the charmap UseTTCharmapUnicode accepts outright.
Sourcepub const WINDOWS_SYMBOL: Self
pub const WINDOWS_SYMBOL: Self
Windows Symbol, the 0xF0xx private-use charmap.
Sourcepub const UNICODE_SYNTHETIC: Self
pub const UNICODE_SYNTHETIC: Self
The synthesized Unicode charmap a Type 1 face exposes first.
Sourcepub const ADOBE_CUSTOM: Self
pub const ADOBE_CUSTOM: Self
A Type 1 face’s own encoding vector, which FreeType reports as
ADOBE_CUSTOM.
Sourcepub fn is_unicode(self) -> bool
pub fn is_unicode(self) -> bool
Does this charmap map Unicode?
Platform 0 is Unicode by definition and (3,1)/(3,10) are Windows’
Unicode encodings. This is FreeType’s FT_ENCODING_UNICODE test, which
UseTTCharmapUnicode reads for any charmap that is not (3,0).