Skip to content

Commit

Permalink
Add test checking the lang attribute affects rendering (web-platform-…
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrodesser-Igalia authored Jan 29, 2025
1 parent 0d7d283 commit 034aca8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
20 changes: 20 additions & 0 deletions css/css-fonts/lang-attribute-affects-rendering-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
* { font-size: 50px }

@font-face {
font-family: test-font-family;
src: url(support/fonts/Lato-Medium.ttf);
}

div { font-family: test-font-family; }
</style>
</head>
<body>
`lang="en"` should render ligatures, `lang="tr"` not.
<div lang="tr">fi</div>
</body>
</html>
24 changes: 24 additions & 0 deletions css/css-fonts/lang-attribute-affects-rendering.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="help" href="https://html.spec.whatwg.org/#attr-lang">
<link rel="mismatch" href="lang-attribute-affects-rendering-ref.html">
<style>
* { font-size: 50px }

@font-face {
font-family: test-font-family;
/* <Lato-Medium.ttf> provides different ligatures for English and
Turkish. */
src: url(support/fonts/Lato-Medium.ttf);
}

div { font-family: test-font-family; }
</style>
</head>
<body>
`lang="en"` should render ligatures, `lang="tr"` not.
<div lang="en">fi</div>
</body>
</html>

0 comments on commit 034aca8

Please sign in to comment.