summaryrefslogtreecommitdiffstats
path: root/layout/reftests/text/synthetic-bold-zero-width-01.html
blob: 027b419eb4fe8ff534163dbb2e1c38db6b95acbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<meta charset=utf-8>
<style>
@font-face {
  font-family: Fira;
  src: url(../fonts/fira/FiraSansOT-Regular.otf);
}
body {
  /* We want a font that only has a single weight, and supports 'x' and zero-width U+0301.
   * The Apple Symbols and Segoe UI Symbol fonts appear to meet this requirement on macOS
   * and Win10 respectively.
   * If they're not available, we use a single face of Fira loaded via @font-face.
   */
  font: 24px Apple Symbols, Segoe UI Symbol, Fira;
}
.bold {
  font-weight: bold;
}
span {
  color: transparent;
}
</style>
<body>
<!-- any number of zero-width characters should not result in any extra space between the 'x' glyphs ... -->
<div>
  xx<br>
  x<span>&#x301;</span>x<br>
  x<span>&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;&#x301;&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;&#x301;&#x301;&#x301;&#x301;</span>x<br>
</div>
<!-- ... even when synthetic bold is in effect -->
<div class=bold>
  xx<br>
  x<span>&#x301;</span>x<br>
  x<span>&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;&#x301;&#x301;&#x301;</span>x<br>
  x<span>&#x301;&#x301;&#x301;&#x301;&#x301;&#x301;&#x301;</span>x<br>
</div>