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
[css-text] Added 2 hanging-punctuation tests #26961
Conversation
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.
I have slightly different fonts, I think, and hanging-punctuation-block-bound-001-ref.html does not render as expected on my system. This is because in the test, “す。” are part of the same inline context, whereas in the reference they are not.
The way to fix this is the following:
<div style="background: lime; border: solid black 3px; color: transparent; position: absolute; z-index: -1; width: 240px">まだよく<br>ています。<br>しかし特</div>
<div style="border: solid 3px transparent; width: 300px">まだよく<br>ています。<br>しかし特</div>
In the first case, we draw the box (perfectly fitted to the content in the block axis, because it has the same content) but not the text.
In the second case, we draw the text, but into a wider box so the period will fit, and overlap it with the previously-drawn box.
Here's how it looks ( Another possibility: to force a .woff resource to overcome the font selection issue: We have already used I have decided to go with the update of the test and reference with the Mplus1p variation. If block-bound with Mplus1p variation is okay with you, then I will also use Mplus1p .woff font resource with the inline-bound test and reference. |
…01 test and reference
Okay. I have adjusted the reference according to our phone call. On my website, the new reference is: I will adjust the block-bound test and the block-bound reference in the PR in a few min. by removing the .woff font resource idea. |
There is a font loading problem in Chrome 97 and Firefox 95 but there is no such problem in Edge 97 (although Edge 97 can fails both tests). I do not believe I can do anything about such problem ... otherwise I am not aware of appropriate code addition to overcome this font loading problem at this moment. |
The font loading problem could be a lack of Japanese fonts on the machines running the tests... Credits to @upsuper |
Note to myself and adding to my to-do-list: I should at least add |
/css/css-text/hanging-punctuation/hanging-punctuation-block-bound-001.html
/css/css-text/hanging-punctuation/reference/hanging-punctuation-block-bound-001-ref.html
/css/css-text/hanging-punctuation/hanging-punctuation-inline-bound-001.html
/css/css-text/hanging-punctuation/reference/hanging-punctuation-inline-bound-001-ref.html
These 2 tests spun from
Issue 4222: [css-text-3] hanging-punctuation effect on inline/block bounds
Credits must go to @stantonma for creating those tests.
At my website, the files are:
http://www.gtalbot.org/BrowserBugsSection/CSS3Text/hanging-punctuation/hanging-punctuation-block-bound-001.html
http://www.gtalbot.org/BrowserBugsSection/CSS3Text/hanging-punctuation/reference/hanging-punctuation-block-bound-001-ref.html
http://www.gtalbot.org/BrowserBugsSection/CSS3Text/hanging-punctuation/hanging-punctuation-inline-bound-001.html
http://www.gtalbot.org/BrowserBugsSection/CSS3Text/hanging-punctuation/reference/hanging-punctuation-inline-bound-001-ref.html
Epiphany 3.32.1.2 (WebKitGTK+ 2.30.3) pass these 2 tests perfectly on my system.