Closed PeterCon closed 4 years ago
Cf #535
Investigate this part further:
"it’s critical to remember to not consume the last glyph, but to keep it available as the first glyph in a subsequent run (this is a departure from normal lookup behaviour)."
Changed for next version.
See my note in https://github.com/MicrosoftDocs/typography-issues/issues/536 on the example in the description ("former" vs "latter"). It applies here too.
Based on feedback and additional info from Koji Ishi, I've revised the draft as follows:
Friendly name: Vertical Contextual Half-width Spacing
Registered by: Adobe/W3C
Function: Contextually re-spaces glyphs designed to be set on full-em heights, fitting them onto individual half-width vertical heights, to approximate more sophisticated text layout, such as what is described in Requirements for Japanese Text Layout (JLREQ) or similar CJK text-layout specifications that expect half-width forms of characters whose default glyphs are full-width.* This differs from 'vhal' in that the re-spacing is contextual. This feature may be invoked to get better fit for punctuation or symbol glyphs without disrupting the monospaced alignment.
* In JLREQ, see, in particular, 3.1.4 Positioning of Consecutive Opening Brackets, Closing Brackets, Commas, Full Stops and Middle Dots and B. Spacing between Characters. See also Requirements for Chinese Text Layout (CLREQ), Requirements for Hangul Text Layout (KLREQ).
Example: When PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS (U+FE36; “︶”, vertical form of FULLWIDTH RIGHT PARENTHESIS U+FF09; “)”) is followed by PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA (U+FE11; “︑”, vertical form of IDEOGRAPHIC COMMA U+3001; “、”), the former is re-spaced to remove half-em of height between them.
Recommended implementation: The font stores a set of adjustments for pairs of glyphs (GPOS lookup type 2 or 8, XPlacement, XAdvance, YPlacement, and YAdvance). These may be stored as one or more tables matching left and right classes, and/or as individual pairs. Additional adjustments may be provided for larger sets of glyphs (e.g. triplets, quadruplets, etc.) to overwrite the results of pair kerns in particular combinations.
Note: When using a GPOS type 2 lookup for this feature, it is recommended that no positioning adjustment be applied to the second glyph in a pair. (That is, that valueFormat2 be set to 0.) As a result, the next glyph pair to be processed after the lookup has been applied to this pair will start at the second glyph. In this way, every glyph in a sequence can undergo positioning adjustment as the first glyph in a pair. Otherwise, if positioning of the second glyph is adjusted, then the next glyph pair to be processed will begin with the glyph following the second glyph. That will result in spacing adjustment happening only for every other pair of glyphs.
Application interface: If a layout engine supports advanced layout for CJK text as described in CLREQ, JLREQ or KLREQ, this feature should not be used. Otherwise, this feature should always be applied in vertical layout of CJK text.
UI suggestion: This feature should not be used in combination with a layout engine that independently provides advanced layout as described in CLREQ, JLREQ or KLREQ. For applications that provide such advanced layout, it may appropriate not to expose control of this feature to users. In applications that do not support such advanced layout, this feature should be enabled by default for vertical layout of CJK text.
Script/language sensitivity: Used mostly in CJKV fonts.
Feature interaction: This feature is mutually exclusive with all other glyph-height features (e.g., 'valt', 'vhal', 'vpal'), which should be turned off when this feature is applied. It deactivates the 'vkrn' feature. See also 'chws'.
Amendment 1 of ISO/IEC 14496-22:2019 adds the 'vchw' feature with this description:
Friendly name: Vertical Contextual Half-width Spacing
Registered by: Adobe/W3C
Function: Contextually respaces glyphs designed to be set on full-em heights, fitting them onto individual half-width vertical heights, to approximate more sophisticated text layout, such as what is described in Requirements for Japanese Text Layout (JLREQ [21]) or similar CJK text-layout specifications that expect half-width forms of characters whose default glyphs are full-width. This differs from 'vhal' in that the respacing is contextual. This feature may be invoked to get better fit for punctuation or symbol glyphs without disrupting the monospaced alignment.
Example: When PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS (U+FE36; "︶", vertical form of FULLWIDTH RIGHT PARENTHESIS U+FF09; ")") is followed by PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA (U+FE11; "︑", vertical form of IDEOGRAPHIC COMMA U+3001; "、"), the latter is respaced to remove half-em of height between them.
Recommended implementation: The font stores a set of adjustments for pairs of glyphs (GPOS lookup type 2 or 8). These may be stored as one or more tables matching left and right classes, &/or as individual pairs. Additional adjustments may be provided for larger sets of glyphs (e.g. triplets, quadruplets, etc.) to overwrite the results of pair kerns in particular combinations.
Application interface: The application passes a sequence of GIDs to the 'vchw' table, and gets back adjusted positions (XPlacement, XAdvance, YPlacement, and YAdvance) for those GIDs. When using the type 2 lookup on a run of glyphs, it’s critical to remember to not consume the last glyph, but to keep it available as the first glyph in a subsequent run (this is a departure from normal lookup behavior).
UI suggestion: This feature would be off by default.
Script/language sensitivity: Used mostly in CJKV fonts.
Feature interaction: This feature is mutually exclusive with all other glyph-height features (e.g., 'valt', 'vhal', 'vpal'), which
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.