Note that there are some explanatory texts on larger screens.

plurals
  1. POFont height differs for different font weights
    text
    copied!<p>I just added a webfont to my CSS file. I'd like to use different weights of the same font. However if I set <code>font-size: 14px</code> at least Chrome and Firefox render the font in rather strange way.</p> <p>All characters with <code>font-weight: normal</code> are in fact only 13px high and the bold parts are 15px high.†</p> <p><strong>Screenshot:</strong> (<code>font-size</code> set to 13px, 14px and 15px):</p> <p><img src="https://i.stack.imgur.com/QohAj.png" alt="Example"> <img src="https://i.stack.imgur.com/v8FMZ.png" alt="Example @3x"></p> <p><strong>CSS <code>font-face</code> declaration:</strong></p> <pre><code>@font-face { font-family: 'Frutiger'; src: url('frutiger.eot'); src: url('frutiger.eot?#iefix') format('embedded-opentype'), url('frutiger.woff') format('woff'), url('frutiger.ttf') format('truetype'); font-weight: normal; font-style: normal; } @font-face { font-family: 'Frutiger'; src: url('frutiger-bold.eot'); src: url('frutiger-bold.eot?#iefix') format('embedded-opentype'), url('frutiger-bold.woff') format('woff'), url('frutiger-bold.ttf') format('truetype'); font-weight: bold; font-style: normal; } </code></pre> <p><strong>Usage Example:</strong></p> <pre><code>&lt;p style="font-family: Frutiger; font-size: 13px"&gt;ABCABC&lt;strong&gt;ABCDABCD&lt;/strong&gt;ASDFASDF&lt;/p&gt; &lt;p style="font-family: Frutiger; font-size: 14px"&gt;ABCABC&lt;strong&gt;ABCDABCD&lt;/strong&gt;ASDFASDF&lt;/p&gt; &lt;p style="font-family: Frutiger; font-size: 15px"&gt;ABCABC&lt;strong&gt;ABCDABCD&lt;/strong&gt;ASDFASDF&lt;/p&gt; </code></pre> <p><strong>Source of font:</strong></p> <p>Unknown, file has been passed along in my company for years. I used Font Squirrel to generate the *.woff, *.svg, and *.eot files. Same results with and without Font Squirrel's hinting feature.</p> <p><strong>Live Example:</strong></p> <p><a href="http://font-render-issue.herokuapp.com/" rel="nofollow noreferrer">http://font-render-issue.herokuapp.com/</a></p> <p>Is there a way I can fix this?</p> <p><sub>† If you blend the first line (13px) over the second (14px) you can see that the non-bold parts match exactly. If you do the same thing with the second and third (15px) line, you can see that the bold parts match (at least in terms of height).</sub></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