google / fonts

Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
https://fonts.google.com
18.2k stars 2.61k forks source link

Keep halt/vhal, chws/vchw OpenType features in CJK fonts #7532

Open yisibl opened 6 months ago

yisibl commented 6 months ago

Describe the bug

Chrome 123 now supports the CSS text-spacing-trim property for CJK Punctuation Width Adjustment.

In Chinese, Japanese, and Korean, applying kerning between punctuation characters improves the readability and produces more visually pleasing typography. Most printed materials and word processors apply this kerning today.

This blog post illustrates the feature: https://developer.chrome.com/blog/css-i18n-features#cjk_punctuation_kerning_text-spacing-trim

Currently, the Chrome implementation relies on fonts containing halt/vhal, chws/vchw OpenType features; however, Google Fonts removes them when subsetting, making text-spacing-trim unusable in Chrome.

To Reproduce

Demo: https://codepen.io/yisi/pen/vYMJPyK Please test with Chrome Canary 125.0.6407.0, there was an issue before that.

Expected behavior

Expect the same effect as the iconfont.cn in the example. The spacing between colons() and quotation() marks becomes smaller.

Screenshots

The font is: Noto Serif SC

image

yisibl commented 1 day ago

@davelab6 Can you help look at it?