wpt / svg / coordinate-systems / viewBox-scaling-text-001.html

Status: PASS | Duration: 6ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/svg/coordinate-systems/viewBox-scaling-text-001.html

<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <meta name="assert" href="1px-tall-text should be visible when scaled up via the SVG viewBox attribute">
  <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">
  <meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-10">
  <style>
    svg {
      width: 100px;
      height: 100px;
      background: lightgray;
      overflow: visible;
    }
    text {
      font: 1px/1 monospace;
    }
  </style>
</head>
<body>
  <svg viewBox="0 0 1 1">
    <text x="0" y="1">X̂̂̂̂̂̂</text>
  </svg>
</body>

/svg/coordinate-systems/support/viewBox-scaling-text-001-ref.html

<!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>
    svg {
      width: 100px;
      height: 100px;
      background: lightgray;
      overflow: visible;
    }
    text {
      font: 100px/1 monospace;
    }
  </style>
</head>
<body>
  <svg>
    <text x="0" y="100">X̂̂̂̂̂̂</text>
  </svg>
</body>