-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test checking the lang attribute affects rendering #50336
Add test checking the lang attribute affects rendering #50336
Conversation
The DejaVuSerif font was added since it provides different ligatures for Catalan and English. Not reusing <css/css-writing-modes/support/DejaVuSerif-webfont.woff> since that's an older version, see [1], not providing different ligatures. [2] Doesn't provide that functionality either. The newly added <DejaVuSerif.ttf> stems from [2]. [1] https://github.com/web-platform-tests/wpt/commits/master/css/css-writing-modes/support/DejaVuSerif-webfont.woff [2] http://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.zip [3] https://github.com/web-platform-tests/wpt/blob/c3b8c1186bb1f3a4aedaff5311126aacb90cc868/fonts/noto/noto-sans-v8-latin-regular.woff
…ibuteAffectsLigatures
The test passes for Chrome and Firefox. For WebKitGTK's MiniBrowser, it fails. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the test addition, this works, but I have some concerns about DejaVu Sans, in particular as this change suggests to add a second copy.
I noticed recently this font is not maintained since 2016 and also has some issues as missing cap height and x height metrics in the OS/2 table. Hence I would check to see if this could be demonstrated with open-source, more recently released and updated fonts, for example from the Noto collection or Roboto perhaps?
fonttools' ttx -tgsub -o- <font file>
or HarfBuzz' hb-shape
testing tool might help in identifying whether there are locale specific ligatures in such fonts.
Thanks for the pointers. Learning why the test currently passes with the DejaVu font, before replacing that font.
|
I'm happy to see additional test coverage for this sort of behavior. Just a note in passing: there's already a file css/css-fonts/language-specific-01.html that aims to exercise some language-dependent behavior; however, it lacks a linked reference file, so I guess it doesn't actually get used unless one loads and inspects it manually. (It uses a copy of Lato, found in the support/fonts dir, which has different behavior for "fi" in Turkish vs default.) So perhaps it'd be good to create a reference case for that file? (In addition to the new test being added here.) |
Thanks for the pointers. Updated this PR. I'll add a separate test, checking "fi" for English and Turkish are rendered differently for the Lato font. Since the test of this PR relies on that assumption. |
I'll simplify the test of this PR. It's sufficient to check "fi" renders differently for Turkish and English. |
Will consider adding a reference case for that file, but in a separate PR. Filed #50364 so that it's not forgotten, but I currently lack time for that change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for updating the test to a leaner version without requiring a font addition. I'd suggest to hear it from Jonathan on the updated PR as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
034aca8
into
web-platform-tests:master
The added test is self-describing.