mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 12:15:33 +00:00
Bug 1544432 part 2: Add WPT for text being scaled up via SVG viewBox. r=longsonr
--HG-- extra : rebase_source : f1bf953add83bbe6781112eee0973bdc59239f15
This commit is contained in:
parent
3dc2f0f450
commit
395362fcd6
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Reference case for text scaled via SVG viewBox</title>
|
||||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
|
||||
<style>
|
||||
body { margin: 0; }
|
||||
svg {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
}
|
||||
rect {
|
||||
fill: lime;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<svg>
|
||||
<rect height="100%" width="100%"></rect>
|
||||
</svg>
|
||||
</body>
|
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase for text scaled via SVG viewBox</title>
|
||||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute">
|
||||
<link rel="match" href="support/viewBox-scaling-text-001-ref.html">
|
||||
<style>
|
||||
body { margin: 0; }
|
||||
svg {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
}
|
||||
text {
|
||||
fill: lime;
|
||||
font: 1px/1 Ahem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- We position the <text> at y=0.8px, which is the alphabetic baseline for
|
||||
the Ahem font. This puts the bottom of the rendered square glyph at
|
||||
y=1px, i.e. the bottom of the SVG viewport. With that, the 1px-tall Ahem
|
||||
square 'X' character should fully fill the SVG viewport (which is then
|
||||
scaled up from 1x1 to 100x100). -->
|
||||
<svg viewBox="0 0 1 1">
|
||||
<text x="0" y="0.8">X̂̂̂̂̂̂</text>
|
||||
</svg>
|
||||
</body>
|
Loading…
Reference in New Issue
Block a user