Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text/word-spacing/word-spacing-combining-mark-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>CSS Text test: word-spacing does not separate a combining mark from its base in RTL</title>
<link rel="author" title="Brent Fulgham" href="mailto:bfulgham@apple.com">
<link rel="match" href="reference/word-spacing-combining-mark-002-ref.html">
<meta name="assert" content="Word spacing is added at word-separator characters, in a right-to-left run as much as in a left-to-right one. A space and the combining mark applied to it are one typographic character unit, so word-spacing must not displace the mark relative to the space it is attached to.">
<style>
/* The RTL counterpart of word-spacing-combining-mark-001, on a Hebrew base (a
genuine RTL run rather than a bidi-override, which would skip bidi rule W1):
U+0301 anchors to the space glyph as well as to ALEF, so the mark's base is the
word-separator character that word-spacing widens. DALET is the same middle bar
as an ordinary spacing glyph, so ALEF followed by DALET paints what ALEF, space,
U+0301 paints when the mark stays on its space.
Generated by css/css-text/tools/generate-mark-anchor-font.py. */
@font-face {
font-family: "mark-anchor-test";
src: url("/fonts/mark-anchor-test.ttf") format("truetype");
}
div {
font-family: "mark-anchor-test";
font-size: 100px;
line-height: 150px;
/* One em, so a displaced mark lands a full glyph clear of its base. */
word-spacing: 100px;
direction: rtl;
white-space: nowrap;
}
</style>
<p>Test passes if the lower black bar below is 100px wide ending at the right
edge, and the upper bar is 100px wide immediately to its left, with no gap
between them horizontally and no bar further left.</p>
<!-- ALEF, then a space carrying a combining mark. Word-spacing widens the
space's advance; the mark must not move with it. -->
<div>א ́</div>
</html>