jcitpc / CJKFont

0 stars 0 forks source link

Clarify the handling of mixed mono-proportional fonts, which constitute a majority of Japanese typography #5

Open kidayasuo opened 11 months ago

kidayasuo commented 11 months ago

This issue was raised in https://github.com/jcitpc/CJKFont/issues/2#issuecomment-1727370641. As I believe this is important enough I am forking this as a separate issue.

@takaakifuji started in https://github.com/jcitpc/CJKFont/issues/2#issuecomment-1727370641

BTW, I had a look on the terminology in some other registered features in the current spec:

kern/vkrn: may be used in addition to any other feature except those which result in fixed (uniform) advance widths/heights pwid: replaces glyphs set on uniform widths (typically full or half-em) with proportionally spaced glyphs palt: re-spaces glyphs designed to be set on full-em widths palt: the font specifies alternate metrics for the full-width glyphs vrt2: replaces some fixed-width (half-, third- or quarter-width) or proportional-width glyphs (mostly Latin or katakana) with forms suitable for vertical writing cpct: the font specifies X- and Y-axis adjustments for a small number of full-width glyphs

They might be used to mean something subtly different in each context, but we are seeing a range of expressions. As the current 'kern'/'vkrn' definition already forbids the usage with 'fwid'/'hwid' glyphs in the Feature Interaction section, I hope we can find a good way to make the whole mechanics clearer. Plus, 'kern' has long been known as one of the on-by-default-regardless features for both app and font developers, so the line 'may be activated' sounds a bit sudden to me from a non-CJK standpoint.

@macnmm replied

@takaakifuji I agree with you in making the whole mechanism clearer. The CJK world being fraught with contradictions and special-cases and interdependencies is what we are trying to surface and make clear. Kern being on by default is not true for CJK, yet few know this until they get user complaints or bugs (or just look bad). Some browsers kern CJK apparently incorrectly; Photoshop just turns all kerning off in CJK, not offering our "和文等幅" (Metrics/Auto for Roman, off for CJK) default found in more text-heavy apps. In my document, I attempted to describe the need for something like 和文等幅 without specifying it specifically. I tried to describe the specific type of CJK glyphs that should not be kerned by default, so engine devs could set a reasonable default with better nuance. I think for foundries, they already know that using 'palt' saves them from making a lot of nearly identical 'kern' pairs. The issue was that browsers and other engine devs were unaware of CJK and the need for a different nuanced default value

@takaakifuji responded:

Thank you so much for clarifying the intention!

As an user, how I understand what InDesign's 和文等幅 achieves in short is 和文はベタ、欧文はプロポーショナル in Japanese. The phrase leaves many technical ambiguities but I think the intention is clear. And it's not about the widths but the writing script. So, sort of the descriptions like

Script/language sensitivity: Shall be conditionally applied to CJK glyph runs to achieve the '和文はベタ、欧文はプロポーショナル' setting by default, and become fully script-insensitive once 'palt' gets activated.

thus

Script/language sensitivity: Shall be conditionally applied to CJK glyph runs so that they will be set solid (placed on a grid) by default, and become fully script-insensitive once 'palt' gets activated.

should at least tell devs that they need a different nuanced default value. Might be a setback or too unspecific as it fails to mention the edge cases like the proportional-by-default CJK fonts, but my original concern was the idea of CJK widths are too hard to explain in the limited length of text, and may become confusing to font developers as well.

What do you think of the idea of avoiding the term mono-spaced CJK in the first place?

@macnmm replied:

So, my intention with the phrasing "monospaced (e.g. CJK script) runs" is meant to indicate kerning must happen by default on proportional glyphs only, no matter what script they are. In other words, default kerning is about the proportionality/monospaced-ness, not about the script. But, since CJK script is normally monospaced, by extension it should not be kerned by default.

I think eliminating the "monospaced" wording will focus on font script and CJK only, when my point is valid for monospaced Latin fonts (or any script fonts) as well as CJK.