w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.35k stars 641 forks source link

[css-text-4] text-transform-property full-size-kana seems out of place #10140

Open macnmm opened 3 months ago

macnmm commented 3 months ago

https://www.w3.org/TR/css-text-4/#text-transform-property

Converts all small Kana characters to the equivalent full-size Kana. This value is typically used for ruby annotation text, where authors may want all small Kana to be drawn as large Kana to compensate for legibility issues at the small font sizes typically used in ruby.

Small kana is not equivalent to large kana -- small kana cannot exist on their own but modify the character before and are always attached to the prior character. They are not simply a small version of the large kana character. In ruby usage, it is true to make it more legible by convention, small kana are written the same size (or very close) to the other kana. Kana OTF feature can perform this using glyph substitution. I believe changing the text itself, in the manner of a case change, is completely a different and unrelated transformation to this ruby usage of a larger glyph to display what is functionally a different character altogether.

frivoal commented 3 months ago

We could replace "equivalent" by "corresponding", to make the sentence more accurate.

Given the following sentence in the spec, I think this is a reasonable feature though:

It has no effect on the underlying content, and must not affect the content of a plain text copy & paste operation.

We could expand on that and say something like:

[…] must not affect the content of a plain text copy & paste operation, nor speech synthesis.

I'm not sure which OTF feature you're refering to. https://learn.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-ruby maybe? If so, it could do that, but typically is more related with stroke thickness, so that the ruby font size and the main font size relate well to each other.

Regardless, OTF features are font dependent, and this is not, so there are different tradeoffs, and I think it's fine to have both.