Better approach to some tests to avoid subpixel spacing differences. (Bug 457821)

This commit is contained in:
L. David Baron 2008-11-14 14:07:45 -08:00
parent 4aa4a48164
commit 6eb576e8cc
10 changed files with 47 additions and 52 deletions

View File

@ -18,6 +18,9 @@
<body>
<p>ABC</p>
<p>A</p>
<p>B</p>
<p>C</p>
</body>
</html>

View File

@ -16,11 +16,19 @@
src: url(../fonts/markB.ttf);
}
@font-face {
font-family: "MarkD";
src: url(../fonts/markD.ttf);
}
</style>
</head>
<body>
<p><span style="font-family: MarkA">A</span><span style="font-family: MarkB">B</span>C</p>
<p style="font-family: MarkD">DDC</p>
<p style="font-family: MarkA">A</p>
<p style="font-family: MarkB">B</p>
<p style="font-family: MarkA">C</p>
</body>
</html>

View File

@ -23,6 +23,9 @@
<body>
<p>ABC</p>
<p>A</p>
<p>B</p>
<p>C</p>
</body>
</html>

View File

@ -7,28 +7,17 @@
<style type="text/css">
@font-face {
font-family: "MarkA";
src: url(../fonts/markA.ttf);
font-family: "MarkXMark2Y";
src: url(../fonts/markXmark2Y.ttf);
}
@font-face {
font-family: "Mark2B";
src: url(../fonts/mark2B.ttf);
}
span.spacer {
/* to ensure the same vertical positioning of the text */
display: inline-block;
height: 3em;
width: 1em;
vertical-align: baseline;
}
body { font-family: "MarkXMark2Y"; }
</style>
</head>
<body>
<p><span style="font-family: MarkA">A</span><span style="font-family: Mark2B">B</span>C<span class="spacer"></span></p>
<p>XYC</p>
</body>
</html>

View File

@ -28,19 +28,11 @@
body { font-family: "One"; }
span.spacer {
/* to ensure the same vertical positioning of the text */
display: inline-block;
height: 3em;
width: 1em;
vertical-align: baseline;
}
</style>
</head>
<body>
<p>ABC<span class="spacer"></span></p>
<p>ABC</p>
</body>
</html>

View File

@ -7,28 +7,17 @@
<style type="text/css">
@font-face {
font-family: "MarkA";
src: url(../fonts/markA.ttf);
font-family: "MarkXMark2Y";
src: url(../fonts/markXmark2Y.ttf);
}
@font-face {
font-family: "Mark2B";
src: url(../fonts/mark2B.ttf);
}
span.spacer {
/* to ensure the same vertical positioning of the text */
display: inline-block;
height: 3em;
width: 1em;
vertical-align: baseline;
}
body { font-family: "MarkXMark2Y"; }
</style>
</head>
<body>
<p><span style="font-family: MarkA">A</span><span style="font-family: Mark2B">B</span>C<span class="spacer"></span></p>
<p>XYC</p>
</body>
</html>

View File

@ -28,19 +28,11 @@
body { font-family: "One"; }
span.spacer {
/* to ensure the same vertical positioning of the text */
display: inline-block;
height: 3em;
width: 1em;
vertical-align: baseline;
}
</style>
</head>
<body>
<p>ABC<span class="spacer"></span></p>
<p>ABC</p>
</body>
</html>

View File

@ -19,9 +19,9 @@ fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == src-list-format-3.html src-list
# FIXME: The behavior here is neither mandated nor specified by the spec, but
# it really ought to be.
HTTP(..) == order-1.html order-1-ref.html
fails-if(MOZ_WIDGET_TOOLKIT!="gtk2") HTTP(..) == order-2.html order-2-ref.html
fails-if(MOZ_WIDGET_TOOLKIT!="gtk2") HTTP(..) == order-3.html order-3-ref.html
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") random-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) == multiple-in-family-1.html multiple-in-family-1-ref.html
fails HTTP(..) == order-2.html order-2-ref.html
fails HTTP(..) == order-3.html order-3-ref.html
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") random-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) == multiple-in-family-1.html multiple-in-family-1-ref.html
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") random-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) != multiple-in-family-1.html multiple-in-family-1-notref.html
random-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) == prop-order-over-rule-order-1a.html prop-order-over-rule-order-2a.html
random-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) == prop-order-over-rule-order-1b.html prop-order-over-rule-order-2b.html

View File

@ -66,3 +66,22 @@ for codepoint in range(ord("A"), ord("D") + 1):
g.width = width
f.generate("mark" + mark + charname + ".ttf")
# And, for references, generate markXmark2Y
f = fontforge.font()
n = "MarkXMark2Y"
f.fontname = n
f.familyname = n
f.fullname = n
f.copyright = "Copyright (c) 2008 Mozilla Corporation"
g = f.createChar(ord("X"), "X")
g.importOutlines("mark-glyph.svg")
g.width = 1500
g = f.createChar(ord("Y"), "Y")
g.importOutlines("mark2-glyph.svg")
g.width = 1800
f.generate("markXmark2Y.ttf")

Binary file not shown.