fune/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-shaping-001.html
Florian Rivoal 1afd176b94 Bug 1516420 [wpt PR 14669] - [css-text-3] tests for shaping at wrapping opportunities, a=testonly
Automatic update from web-platform-tests
[css-text-3] tests for shaping and overflow-wrap

--
[css-text] Don't rely on zwj for arabic shaping

zwj should force Arabic shaping, but its support is spotty (e.g. chrome
doesn't honor it at the beginning of lines). Instead, use specialized
pre-shaped code-points.

--
[css-text-3] Add shaping tests for other line-breaking properties

--
[css-text-3] Use correct spec reference

--
[css-text] Rework Uyghur hyphenation test based on code review

--
[css-text] Use explicit font for Arabic tests

--

wpt-commits: 4f4e91371ffa5b1e443067d6c659beaffbb7841b, 0a6024f2a982fbb4a0c67775042d411c0c0c8df5, a4f52ec111762c32719dd8ec6ae77ac21e7bf167, 50b396f113504a587a7b0ca10ce9e13b380306f3, 980a685f4876780e2809af884e5c9c7ead1e517b, 8f7459b8257a1b71da7f0f25507a4e03842f0b17
wpt-pr: 14669
2019-06-05 10:28:21 +01:00

39 lines
1.4 KiB
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: overflow-wrap:break-word and text-shaping</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://www.w3.org/TR/css-text-3/#word-break-shaping">
<link rel="help" href="https://www.w3.org/TR/css-text-3/#overflow-wrap-property">
<link rel="match" href="reference/overflow-wrap-shaping-001-ref.html">
<meta name="assert" content="Shaping characters are still shaped as if the word were not broken when a line is broken by overflow-wrap:break-word">
<style>
@font-face {
font-family: 'csstest_noto';
src: url('/fonts/noto/NotoNaskhArabic-regular.woff2') format('woff2');
}
div {
font-family: 'csstest_noto';
font-size: 4em;
}
section {
float: left; /* to sizing to the intrinsic min of the ref box*/
position: relative;
}
#ref {
border: solid orange;
margin: 1rem;
}
#test {
border: solid blue;
position: absolute; /* to avoid influencing the size of the section */
left: 1rem;
right: 1rem;
overflow-wrap: break-word;
}
</style>
<p>Test passes if the blue and organge boxes are identical. Pay attention to characters at the left of the first line, and on the second line.
<section>
<div dir=rtl lang=ar id=ref>&#xFECB;&#xFE8E;&#xFE8B;&#xFEE0;<br>&#xFE94;</div>
<div dir=rtl lang=ar id=test>عائلة</div>
</section>