Expand description
CID font support for CJK text extraction.
Handles Type0 (composite) fonts with CIDFontType0 and CIDFontType2 descendant fonts. Provides CID-to-GID mapping, /W (width) array parsing, and /DW (default width) handling for CID fonts.
Structs§
- CidFont
Metrics - Font metrics for a CID font, handling the /W array and /DW default width.
- CidSystem
Info - CID system information from the /CIDSystemInfo dictionary.
- PredefinedC
MapInfo - Information about a predefined CMap encoding.
Enums§
- CidFont
Type - CID font subtype.
- CidTo
GidMap - CID-to-GID (glyph ID) mapping strategy.
Functions§
- extract_
cid_ font_ metrics - Extract CID font metrics from a CIDFont dictionary (descendant of Type0).
- get_
descendant_ font - Extract the descendant CIDFont dictionary from a Type0 font.
- get_
type0_ encoding - Get the encoding name from a Type0 font dictionary.
- is_
subset_ font - Check if a font name has a subset prefix.
- is_
type0_ font - Detect whether a font dictionary represents a Type0 (composite/CID) font.
- parse_
predefined_ cmap_ name - Parse a predefined CMap name and extract its information.
- parse_
w_ array - Parse a /W (width) array from a CID font dictionary.
- strip_
subset_ prefix - Strip the subset prefix from a font name.