-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some additional tests for variable font 'slnt' behavior.
These tests cover the regression affecting the Inter variable font, fixed by the preceding patch. Depends on D169335 Differential Revision: https://phabricator.services.mozilla.com/D169336 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1815679 gecko-commit: c8491c0074db8bc1f841c77720089583dbc72ac6 gecko-reviewers: emilio
- Loading branch information
1 parent
f574d4f
commit 35a6d90
Showing
4 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<meta charset=utf-8> | ||
<title>CSS test: mapping of font-style:oblique to opentype 'slnt' axis</title> | ||
<link rel="author" title="Jonathan Kew" href="mailto:[email protected]"/> | ||
<link rel="help" href="https://drafts.csswg.org/css-fonts/#valdef-font-style-oblique-angle"/> | ||
<link rel="match" href="font-slant-2-ref.html"/> | ||
<style> | ||
@font-face { | ||
font-family: test; | ||
font-style: normal; | ||
src: url(resources/Inter.var.subset.ttf); | ||
} | ||
.test { | ||
font-synthesis: none; | ||
font: 32px/1.5 test; | ||
} | ||
</style> | ||
<body> | ||
<p>Test passes if none of the following lines are displayed with a slanted font.</p> | ||
<div class="test" style="font-style: oblique">slant</div> | ||
<div class="test" style="font-style: oblique 10deg">slant</div> | ||
<div class="test" style="font-style: oblique -10deg">slant</div> | ||
<div class="test" style="font-style: italic">slant</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<meta charset=utf-8> | ||
<title>CSS reference file: mapping of font-style:oblique to opentype 'slnt' axis</title> | ||
<style> | ||
@font-face { | ||
font-family: test; | ||
/* Version of Inter subset with OpenType tables stripped, | ||
so the browser's synthetic styling should take effect. */ | ||
src: url(resources/Inter.no-var.subset.ttf); | ||
font-style: normal; | ||
font-weight: normal; | ||
font-stretch: normal; | ||
} | ||
.test { | ||
font: 32px/1.5 test; | ||
} | ||
</style> | ||
<body> | ||
<p>Test passes if the following lines are displayed with a variety of synthetic slants.</p> | ||
<div class="test" style="font-style: oblique 10deg">slant</div> | ||
<div class="test" style="font-style: oblique 20deg">slant</div> | ||
<div class="test" style="font-style: oblique -10deg">slant</div> | ||
<div class="test" style="font-style: oblique 14deg">slant</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<meta charset=utf-8> | ||
<title>CSS test: mapping of font-style:oblique to opentype 'slnt' axis</title> | ||
<link rel="author" title="Jonathan Kew" href="mailto:[email protected]"/> | ||
<link rel="help" href="https://drafts.csswg.org/css-fonts/#valdef-font-style-oblique-angle"/> | ||
<link rel="match" href="font-slant-3-ref.html"/> | ||
<style> | ||
@font-face { | ||
font-family: test; | ||
/* The font resource includes a 'slnt' axis, but our font-style descriptor | ||
should prevent it being used to render oblique/italic styles. */ | ||
src: url(resources/Inter.var.subset.ttf); | ||
font-style: normal; | ||
font-weight: normal; | ||
font-stretch: normal; | ||
} | ||
.test { | ||
font-synthesis: style; | ||
font: 32px/1.5 test; | ||
} | ||
</style> | ||
<body> | ||
<p>Test passes if the following lines are displayed with a variety of synthetic slants.</p> | ||
<div class="test" style="font-style: oblique 10deg">slant</div> | ||
<div class="test" style="font-style: oblique 20deg">slant</div> | ||
<div class="test" style="font-style: oblique -10deg">slant</div> | ||
<div class="test" style="font-style: italic">slant</div> |
Binary file not shown.