Note that there are some explanatory texts on larger screens.

plurals
  1. POBad SVG text quality in Opera
    text
    copied!<p>I am trying to render an SVG document containing some text. Everything is good in Chrome/FF/Safari:</p> <p><img src="https://i.stack.imgur.com/xIP5R.png" alt="enter image description here"></p> <p>But in Opera (v12.14, Mac OS X) font looks very ugly:</p> <p><img src="https://i.stack.imgur.com/PSlwU.png" alt="enter image description here"></p> <p>Is this normal or maybe I am doing something wrong? Is it possible to improve rendering quality? Here is the code:</p> <pre><code>&lt;?xml version="1.0" standalone="no"?&gt; &lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt; &lt;svg width="400" height="200" version="1.1" xmlns="http://www.w3.org/2000/svg"&gt; &lt;text x="10" y="30" font-family="Arial" font-size="12" font-weight="bold"&gt;123 xyz XYZ&lt;/text&gt; &lt;text x="10" y="50" font-family="Arial" font-size="12" font-weight="bold" fill="#666"&gt;123 xyz XYZ&lt;/text&gt; &lt;text x="10" y="70" font-family="Arial" font-size="12" font-weight="normal" fill="#444"&gt;123 xyz XYZ&lt;/text&gt; &lt;text x="10" y="88" font-family="Arial" font-size="10" font-weight="normal" fill="#444"&gt;123 xyz XYZ&lt;/text&gt; &lt;/svg&gt; </code></pre> <p>I've tried:</p> <ul> <li>embedding fonts using <code>@font-face</code>;</li> <li>using fonts other than Arial;</li> <li>setting <code>text-rendering="optimizeLegibility"</code>.</li> </ul> <p>None of this helps.</p> <h2>Edit</h2> <p>The solution is to use <code>text-rendering="geometricPrecision"</code> (see Erik Dahlström's answer):</p> <p><img src="https://i.stack.imgur.com/oy2ac.png" alt="enter image description here"></p> <p>The result is still worse than in other browsers, but it seems that for now it is the best that one can get in Opera for Mac OS.</p> <p>I've also tried to translate the content by 0.5px in both directions. It slightly changes the output, but doesn't improve the quality in general.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload