Bug 1376231 - Reftest for GPOS-feature adjustments to vertical glyph advances. r=jrmuizel

This commit is contained in:
Jonathan Kew 2017-09-21 14:18:18 +01:00
parent 230ad8f9a7
commit 2f559c90c7
4 changed files with 125 additions and 0 deletions

View File

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<style>
@font-face {
font-family: test;
src: url(../fonts/NotoSansCJKjp-Regular.subset.otf);
}
body {
font-family: test, serif;
line-height: 2em;
}
p {
margin: 1em;
}
span {
display: inline-block;
inline-size: 9em; /* length of 9 standard CJK chars */
}
.v {
writing-mode: vertical-rl;
}
.green {
color: green;
background: green;
}
.overlay {
position: relative;
offset-block-start: -3em;
}
</style>
</head>
<body>
There should be no red:
<div>
<p><span>&nbsp;</p>
<p class="overlay"><span class="green">&nbsp;</p>
<p><span>&nbsp;</p>
<p class="overlay"><span class="green">&nbsp;</p>
</div>
<div class="v">
<p><span>&nbsp;</p>
<p class="overlay"><span class="green">&nbsp;</p>
<p><span>&nbsp;</p>
<p class="overlay"><span class="green">&nbsp;</p>
</div>

View File

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<style>
@font-face {
font-family: test;
src: url(../fonts/NotoSansCJKjp-Regular.subset.otf);
}
body {
font-family: test, serif;
line-height: 2em;
}
p {
margin: 1em;
}
span {
display: inline-block;
}
.v {
writing-mode: vertical-rl;
}
.halt {
font-feature-settings: "halt";
/* there are 3 characters in the text that should be affected by 'halt',
so if we add 1.5em of padding, the overall width will be the same */
padding-inline-end: 1.5em;
}
.palt {
font-feature-settings: "palt";
/* 'palt' results in even tighter spacing than 'halt', so we can add a
little more padding and the result should still be obscured by the
overlaid 'halt' span. (We don't try for an exact match as this involves
fractional pixel widths and would be very fragile.) */
padding-inline-end: 1.6em;
}
.vhal {
font-feature-settings: "vhal";
padding-inline-end: 1.5em;
}
.vpal {
font-feature-settings: "vpal";
padding-inline-end: 1.6em;
}
.red {
color: red;
background: red;
}
.green {
color: green;
background: green;
}
.overlay {
position: relative;
offset-block-start: -3em;
}
</style>
</head>
<body>
There should be no red:
<div>
<!-- check that the red 'halt' span is entirely hidden by the green default span -->
<p><span class="halt red">&#x3084;&#x3063;&#x307B;&#x3046;&#x3001;&#x300C;&#x4E16;&#x754C;&#x300D;</p>
<p class="overlay"><span class="green">&#x3084;&#x3063;&#x307B;&#x3046;&#x3001;&#x300C;&#x4E16;&#x754C;&#x300D;</p>
<!-- check that the red 'palt' span is entirely hidden by the green default span -->
<p><span class="palt red">&#x3084;&#x3063;&#x307B;&#x3046;&#x3001;&#x300C;&#x4E16;&#x754C;&#x300D;</p>
<p class="overlay"><span class="green">&#x3084;&#x3063;&#x307B;&#x3046;&#x3001;&#x300C;&#x4E16;&#x754C;&#x300D;</p>
</div>
<div class="v">
<!-- check the equivalent vertical-mode features -->
<p><span class="vhal red">&#x3084;&#x3063;&#x307B;&#x3046;&#x3001;&#x300C;&#x4E16;&#x754C;&#x300D;</p>
<p class="overlay"><span class="green">&#x3084;&#x3063;&#x307B;&#x3046;&#x3001;&#x300C;&#x4E16;&#x754C;&#x300D;</p>
<p><span class="vpal red">&#x3084;&#x3063;&#x307B;&#x3046;&#x3001;&#x300C;&#x4E16;&#x754C;&#x300D;</p>
<p class="overlay"><span class="green">&#x3084;&#x3063;&#x307B;&#x3046;&#x3001;&#x300C;&#x4E16;&#x754C;&#x300D;</p>
</div>

View File

@ -118,3 +118,6 @@ HTTP(..) == subsuper-nofallback.html subsuper-nofallback-ref1.html
random-if(cocoaWidget) HTTP(..) == subsuper-nofallback.html subsuper-nofallback-ref2.html # bug 1139269
HTTP(..) != subsuper-nofallback.html subsuper-nofallback-notref.html
HTTP(..) == subsuper-fallback-size.html subsuper-fallback-size-ref.html
# GPOS spacing adjustments in vertical mode -- subsetted opentype/cff test font fails to load on Win7
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) HTTP(..) == 1376231-vertical-gpos-adjustments.html 1376231-vertical-gpos-adjustments-ref.html

Binary file not shown.