NEW 158522
font-variant-caps: all-small-caps should not apply to Japanese characters
https://bugs.webkit.org/show_bug.cgi?id=158522
Summary font-variant-caps: all-small-caps should not apply to Japanese characters
Philippe Wittenbergh
Reported 2016-06-08 06:20:55 PDT
Created attachment 280801 [details] test case span { font-variant-caps: all-small-caps; } should have no effect (visualy change the font-size) for Japanese characters (in the test case, the characters in red).(in the test case, the characters in red). Firefox handles this correctly, Safari 9.1, Safari TP reduce the size of the characters. the equivalent font-feature-settings: 'smcp', 'c2sc’; works OK.
Attachments
test case (714 bytes, text/html)
2016-06-08 06:20 PDT, Philippe Wittenbergh
no flags
Safari, Chrome and Firefox (Reference Screenshot) (156.87 KB, image/png)
2025-01-27 22:28 PST, Ahmad Saleem
no flags
Brent Fulgham
Comment 1 2022-07-14 15:49:12 PDT
This continues to be a problem in Safari and Chrome.
Radar WebKit Bug Importer
Comment 2 2022-07-14 15:49:23 PDT
Alexsander Borges Damaceno
Comment 3 2024-12-20 11:22:37 PST
fantasai
Comment 4 2025-01-27 22:22:10 PST
This seems like the wrong approach, and is weirdly specific to Japanese. We need to accommodate all of the world's writing systems, not just a few. If the font supports the case variation we're requesting via `font-variant-caps`, then we should defer to its decisions about which characters are affected. If we're synthesizing, though, we need to make those decisions. My impression of the general rule is that case variations should apply to letters and numbers from bicameral scripts, and not to those from unicameral scripts. So if we're synthesizing this feature, then we need to make sure we apply it to bicameral scripts only. Things get a little questionable once we get into things like symbols, though, and I'm not sure what's the right thing to do with those. What is Firefox doing, exactly?
Ahmad Saleem
Comment 5 2025-01-27 22:28:24 PST
Created attachment 474036 [details] Safari, Chrome and Firefox (Reference Screenshot)
Alexsander Borges Damaceno
Comment 6 2025-01-27 23:16:48 PST
@fan(In reply to fantasai from comment #4) > This seems like the wrong approach, and is weirdly specific to Japanese. We > need to accommodate all of the world's writing systems, not just a few. > > If the font supports the case variation we're requesting via > `font-variant-caps`, then we should defer to its decisions about which > characters are affected. > > If we're synthesizing, though, we need to make those decisions. My > impression of the general rule is that case variations should apply to > letters and numbers from bicameral scripts, and not to those from unicameral > scripts. So if we're synthesizing this feature, then we need to make sure we > apply it to bicameral scripts only. > > Things get a little questionable once we get into things like symbols, > though, and I'm not sure what's the right thing to do with those. > > What is Firefox doing, exactly? In the case of Firefox, it is changing small caps to normal when displaying Japanese characters. You are right about the support for other languages. I have also tested Chinese and Arabic characters in Firefox, and they behave the same way as Japanese characters, as it doesn’t make sense to apply small caps for these languages. Firefox is working correctly with these too. Maybe we could implement this in small steps, one language at a time, as I think addressing a lot of languages or all at same time would be much more complex.
fantasai
Comment 7 2025-02-03 13:47:11 PST
@Ahmad That answers the question of what it's doing for Japanese letters, but I think the more interesting questions are around symbols and other characters that are not letters, and more generally how does their code distinguish between characters that should get synthetic small-caps and those that shouldn't--and why did they choose the way they did.
fantasai
Comment 8 2025-02-03 13:55:30 PST
Filed https://github.com/w3c/csswg-drafts/issues/11640 in the CSSWG to ask about expected behavior.
Note You need to log in before you can comment on or make changes to this bug.