test pixel-snapping of glyphs b=605043 a=blocking

--HG--
extra : transplant_source : A%DA%D6%9C%AA%E0%CF%86%E3%13S.%FD%13%06%16%AB%D7i%E1
This commit is contained in:
Karl Tomlinson 2010-11-15 08:22:34 +13:00
parent 3f1c699647
commit 3d46dda1e5
9 changed files with 276 additions and 0 deletions

View File

@ -27,6 +27,18 @@ random-if(!cocoaWidget) == font-size-adjust-02.html font-size-adjust-02-ref.html
== soft-hyphens-1a.html soft-hyphens-1-ref.html
== soft-hyphens-1b.html soft-hyphens-1-ref.html
== soft-hyphens-1c.html soft-hyphens-1-ref.html
# Cairo's FreeType and GDI backends snap glyphs to pixels, while Mac (usually)
# and D2D have subpixel positioning. The tests for pixel-snapping assume that
# 1 CSS pixel == 1 device pixel
skip-if(d2d||cocoaWidget) == subpixel-glyphs-x-1a.html subpixel-glyphs-x-1b.html
# Platforms with subpixel positioning already have inconsistent glyphs by
# design, but that is considered more tolerable because they are subpixel
# inconsistencies. On those platforms we just test that glyph positions are
# subpixel.
skip-if(!(d2d||cocoaWidget)) != subpixel-glyphs-x-2a.html subpixel-glyphs-x-2b.html
# No platforms do subpixel positioning vertically
== subpixel-glyphs-y-1a.html subpixel-glyphs-y-1b.html
fails-if(d2d) == subpixel-lineheight-1a.html subpixel-lineheight-1b.html # d2d is bug 610330
== swash-1.html swash-1-ref.html
# Test for bug 593564, synthetic bold should cause glyph metrics to increase
# Random on Windows - fails on tinderbox Opt reftest, passes elsewhere - see bug 597300

View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body {
text-rendering: optimizeLegibility;
font-size: 13px;
}
div {
border: none;
padding: 0px;
}
</style>
</head>
<body>
<div style="position:fixed; left:9.6px">
<div style="font-family: DejaVu Sans, Tahoma, sans-serif">
oxoxoxoxoxoxox
</div>
<div style="font-family: DejaVu Sans, sans-serif">
rnrnrnrnrnrnrn
</div>
<div style="font-family: Tahoma, sans-serif">
zezezezezezeze
</div>
</div>
</body>

View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body {
text-rendering: optimizeLegibility;
font-size: 13px;
}
div {
border: none;
padding: 0px;
}
</style>
</head>
<body>
<div style="position:fixed; left:10.4px">
<div style="font-family: DejaVu Sans, Tahoma, sans-serif">
oxoxoxoxoxoxox
</div>
<div style="font-family: DejaVu Sans, sans-serif">
rnrnrnrnrnrnrn
</div>
<div style="font-family: Tahoma, sans-serif">
zezezezezezeze
</div>
</div>
</body>

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body {
text-rendering: optimizeLegibility;
font-size: 13px;
}
div {
border: none;
padding: 0px;
}
</style>
</head>
<body>
<div style="position:fixed; left:9.6px">
o
</div>
</body>

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body {
text-rendering: optimizeLegibility;
font-size: 13px;
}
div {
border: none;
padding: 0px;
}
</style>
</head>
<body>
<div style="position:fixed; left:10.4px">
o
</div>
</body>

View File

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body {
text-rendering: optimizeLegibility;
font-size: 14.5px;
}
div, span {
border: none;
padding: 0px;
}
span {
/* Offset the baseline by an integer number of pixels */
display: inline-block;
vertical-align: baseline;
height: 30px;
}
</style>
</head>
<body>
<div style="position:fixed; left:10px; top:9.6px; font-family: sans-serif">
e&#x306;&#x327;<span></span>
</div>
<div style="position:fixed; left:100px; top:9.6px; font-family: serif">
e&#x306;&#x327;<span></span>
</div>
</body>

View File

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body {
text-rendering: optimizeLegibility;
font-size: 14.5px;
}
div, span {
border: none;
padding: 0px;
}
span {
/* Offset the baseline by an integer number of pixels */
display: inline-block;
vertical-align: baseline;
height: 30px;
}
</style>
</head>
<body>
<div style="position:fixed; left:10px; top:10.4px; font-family: sans-serif">
e&#x306;&#x327<span></span>
</div>
<div style="position:fixed; left:100px; top:10.4px; font-family: serif">
e&#x306;&#x327<span></span>
</div>
</body>

View File

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body {
text-rendering: optimizeLegibility;
font-size: 14.5px;
}
div, span {
border: none;
padding: 0px;
}
span {
/* Offset the baseline by an integer number of pixels */
display: inline-block;
vertical-align: baseline;
height: 30px;
}
</style>
</head>
<body>
<div style="position:fixed; left:10px; top:9.6px; font-family: sans-serif">
e<span></span><br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
</div>
<div style="position:fixed; left:100px; top:9.6px; font-family: serif">
e<span></span><br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
</div>
</body>

View File

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body {
text-rendering: optimizeLegibility;
font-size: 14.5px;
}
div, span {
border: none;
padding: 0px;
}
span {
/* Offset the baseline by an integer number of pixels */
display: inline-block;
vertical-align: baseline;
height: 30px;
}
</style>
</head>
<body>
<div style="position:fixed; left:10px; top:10.4px; font-family: sans-serif">
e<span></span><br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
</div>
<div style="position:fixed; left:100px; top:10.4px; font-family: serif">
e<span></span><br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
e<br>
</div>
</body>