Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/fonts/font-size-adjust-scale-text.svg - WPT Dashboard Interop Dashboard
<?xml version="1.0" encoding="utf-8"?>
<g id="testmeta">
<title>SVG Text Scaling with with font-size-adjust</title>
<html:link rel="author" title="ChangSeok Oh" href="mailto:changseok@chromium.org" />
<html:link rel="match" href="font-size-adjust-scale-text-ref.svg" />
<html:link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<metadata class="flags">svg</metadata>
<desc class="">The black square should match the reference. The x-height of
the Ahem font is 0.8. Given a font size of 100px and font-size-adjust: 1,
the adjusted font size becomes 125px (1 / 0.8 * 100). Since the text is scaled
up by a factor of 2, the final rendered font size should be 250px.</desc>
</g>
<style type="text/css">
text {
font: 100px/1 Ahem;
font-size-adjust: 1;
transform: scale(2);
}
</style>
<text y="100">X</text>
</svg>