CID Font Widths
Fonts, Rendering, Extraction, Content editing
Description
Real-valued DW, W, DW2 and W2 entries are decoded, validated and applied to following-text positions, extraction and exact replacement, with the first declaration winning for overlapping ranges and defined defaults when entries are absent. Read the sections below when fractional, zero or signed CID widths change expected placement, or when a replacement transaction rejects the metric sources it planned against.
Real-valued horizontal widths
Native composite-font rendering, extraction, and content metrics retain real-valued DW and W widths rather than rounding them to an integer table
Absent or null DW defaults to 1000 units. W supports both consecutive-width arrays and a constant width for a CID range, with unspecified CIDs using DW
When declarations overlap, the first width specified for a CID takes precedence, as required by ISO 32000-2 section 9.7.4.3
Widths may include fractional, zero, or signed values. CID bounds must be integers from 0 through 65535, and all width numbers must be finite
Verified vertical metrics
DW2 supplies the default vertical origin Y and signed advance Y, in that order, with defaults of 880 and -1000. The default origin X is half the corresponding real horizontal width
W2 supports consecutive triples and constant-metric CID ranges. Each triple supplies advance Y, origin X, and origin Y without integer rounding or sign normalization
Overlapping W2 declarations use the first declaration for each CID. Bounded parsing validates CID limits, complete finite triples, references, and array sizes before constructing a sorted interval index
Native rendering, extraction, and content metrics use the same verified vertical data. Legacy W2 array copies do not determine the verified metric lookup
Positions and editing
Fractional widths contribute to following-text positions together with character spacing and horizontal scaling. Default vertical origin vectors use half the corresponding real horizontal width when W2 supplies no override
Exact Unicode replacement retains the fractional advance when calculating compensation for untouched following text
Composite transactions retain the Encoding reference, descendant references, verified CMap sources, horizontal-width sources, and vertical sources used by the selected text. Before committing selected page or Form changes, they check those references, complete CMap stream bytes, numeric metric values, and metric-array items and sizes again
A changed source rejects the transaction without committing selected page content or resource roots. Changes made independently to the original font objects are retained
Limits and qualification
Width decoding validates bounded source items and CID ranges before building the legacy compatibility table. Repeated overlapping ranges retain their first declarations without repeatedly expanding the complete CID domain
Retained horizontal and vertical metric-source and index storage contributes to the transaction's 512 MiB source-planning budget alongside decoded Encoding CMap bytes and page or Form sources
Transactions also recheck Unicode mapping sources as described in Unicode CMap Resources. Embedded TrueType programs, CIDToGIDMap sources, and CFF1 programs have additional checks described in Composite Font Glyph Sources; external-font glyph qualification remains a separate boundary
Vertical exact replacement supports Identity-V and additional verified Encoding CMaps whose used embedded TrueType or CFF1 glyphs pass qualification