RE: CJKフォントのpalt(詰め組)とkernの関係

Nat,

Thank you for your response, but your descriptions seemed to be a bit vague and incomplete.
Does the following scheme that I made based on what you wrote matches your idea?

Given condition: The user wants to apply pair-kerning to a text.
[BTW, I think it’s risky to automatically kern Japanese characters by default, even if the font used has both the ‘palt’ and ‘kern’ information sufficiently.]

On the font side:
If ‘palt’ information exists:
Then:
The ‘palt’ information is applied to the text, so that the text becomes pseudo-proportional.
                        It is assumed that the font is a Japanese font.
If ‘kern’ information exists:
Then:
The ‘kern’ information is applied, and the text is correctly set kerned.
                        Else:
The text is set pseudo-proportionally with the ‘palt’ information.
But, because of the lack of the ‘kern’ information, kerning is not applied.
            Else:
If ‘kern’ information exists:
Then:
The ‘kern’ information is applied, and the text is correctly set kerned.
                                    It is assumed that the font is a Latin proportional font or a Japanese true-proportional font.
                        Else:
Neither the ‘palt’ nor the ‘kern’ information is available in the font.
No alternative metrics and pair-kerning adjustments are made to the characters.
                                    Any kind of fonts can reach this point unless alternative metrics and/or pair-kerning are/is supported.


Recommendation to the font maker:
            Font makers should set kerning pair values based on proportional widths not monospaced widths. Japanese fonts including monospaced characters to which alternative proportional metrics or pair-kerning may be applied optionally with the user’s explicit instruction must have alternative metrics data for the ‘palt’ feature, and if pair-kerning also may be applied, such fonts must have pair-kerning data for the ‘kern’ feature.

On the text engine side:
            It applies the ‘palt’ feature.
            If ‘palt’ information does NOT exist in the font:
            Then:
                        The ‘palt’ feature applied does not work.
                        (Okay, it’s not surprising . . . this font seems to be a proportional font.)
            Else:
                        The ‘palt’ feature applied works.
                        (Hmm . . . this font seems to be a Japanese font. Now, the characters become proportional!)

            It applies the ‘kern’ feature.
            If ‘kern’ information does NOT exist in the font:
            Then:
                        The ‘kern’ feature applied does not work.
                        (Unfortunately, I have to give up kerning. . . .)
            Else:
                        The ‘kern’ feature applied works.
                        (Done!)

Recommendation to the text engine maker:
Engines must apply proportional widths and kerning pairs no matter what font is applied.

Question 1:
I just want to confirm one point here. So, if kerning is applied to a text by using a Japanese font with ‘palt’ but without ‘kern’ information, only ‘palt’ is applied, and the affected characters become proportional. I think this is reasonable, but is this understanding correct?

Question 2:
            All the assumptions and recommendations written above in blue italicized lines can be just informative for the standard, and also some of them are just what we are usually expecting or assuming, but all these are fine as they themselves are. But in this discussion, the latest question is whether the following points written by Mr. Murakami based on Mr. Murata’s previous  explanations are all reasonable or not. What do you think?

Mr. Murakami wrote:

個々のグリフごとに、

・そのグリフにpaltがない場合、kernを有効にする

・そのグリフにpaltがある場合、paltを有効にしないかぎりkernを有効にしない

なるほどこれであれば、CJK全角かどうかの判定は要りません。



これをブラウザに実装するのは難しいでしょうか?



Regards,



--Taro

山本

アドビ


Normally the font determines the behavior and the text engine applies features according to text attributes or controls set by the user.

User: I want all text kerned. Turn on Auto Kerning
Engine: Auto Kerning UI results in turning on palt and kern (vpal and vkrn in vertical), so any font in the selection will be proportional and also kerned.
Layout step: Font is queried for glyphs, positions according to having palt and kern selected.

So, the advice for font makers is different from the advice for engine developers. Engines must apply proportional widths and kerning pairs no matter what font is applied. Font makers must set kerning pair values based on proportional widths not monospaced widths. If the font is already proportional there is no palt feature present so the palt set by the engine is ignored. But if the user switches fonts the palt feature is applied and the text will kern correctly.

—Nat

Received on Sunday, 16 April 2023 00:10:01 UTC