Skip to content

Commit

Permalink
Add reftest to check that Thai locale does not disrupt small font siz…
Browse files Browse the repository at this point in the history
…es in SVG.

Differential Revision: https://phabricator.services.mozilla.com/D228956

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1914190
gecko-commit: 19f2974193544ef1491af32419d3e3ab34cdff54
gecko-reviewers: jwatt
  • Loading branch information
jfkthame authored and moz-wptsync-bot committed Nov 14, 2024
1 parent 744cbcb commit 93a0cb7
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
34 changes: 34 additions & 0 deletions svg/text/reftests/font-size-scaling-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>SVG reference: Thai locale should not disrupt font sizing</title>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">

<style>
svg.ref {
display: block;
margin: 10px;
border: 2px solid gray;
font: 20px Ahem;
}
</style>

<p>All three rectangles should contain similar small black bars:</p>

<svg class="ref">
<g>
<text x="50" y="100">abc</text>
</g>
</svg>

<svg class="ref">
<g>
<text x="50" y="100">abc</text>
</g>
</svg>

<svg class="ref">
<g>
<text x="50" y="100">abc</text>
</g>
</svg>
39 changes: 39 additions & 0 deletions svg/text/reftests/font-size-scaling.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>SVG reftest: Thai locale should not disrupt font sizing</title>
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1914190">
<link rel="match" href="font-size-scaling-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">

<style>
svg {
display: block;
margin: 10px;
border: 2px solid gray;
font: 2px Ahem;
}
svg.ref {
font: 20px Ahem;
}
</style>

<p>All three rectangles should contain similar small black bars:</p>

<svg class="ref">
<g>
<text x="50" y="100">abc</text>
</g>
</svg>

<svg>
<g transform="scale(10)">
<text x="5" y="10">abc</text>
</g>
</svg>

<svg lang="th-TH">
<g transform="scale(10)">
<text x="5" y="10">abc</text>
</g>
</svg>

0 comments on commit 93a0cb7

Please sign in to comment.