Skip to main content

Module cid_font

Module cid_font 

Source
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§

CidFontMetrics
Font metrics for a CID font, handling the /W array and /DW default width.
CidSystemInfo
CID system information from the /CIDSystemInfo dictionary.
PredefinedCMapInfo
Information about a predefined CMap encoding.

Enums§

CidFontType
CID font subtype.
CidToGidMap
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.