Reputation: 1452
I have the following code:
.testFont {
font-size: 16px;
}
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<div class="outter">
<div class="testFont">▴</div>
<div class="testFont">▾</div>
</div>
</body>
</html>
The unicode table below shows that the arrows I used above should be equivalent in size (from visual inspection):
Why are they rendered differently? And how can I get equivalent arrow sizes?
Tested on Chrome and Safari both render the down arrow bigger?
Upvotes: 4
Views: 6678
Reputation: 136707
This is because of Lucida Grande font, which might be the default font on your system :
To avoid it, define the font to use yourself (better a webfont so you'd be sure every one will see the same, but I don't know one that does support these glyphes).
.testFont {
font-size:16px;
/* only tested on mac OS,
if someone could lead me to default win and *nix default fonts,
I'd be glad to include it
*/
font-family: 'Arial Unicode MS', 'Consolas';
}
<div class="outter">
<div class="testFont">▴</div>
<div class="testFont">▾</div>
</div>
Upvotes: 5
Reputation: 517
It seems as if the arrows are the same size, I think it is an optical illusion. See fiddle with arrows output: https://jsfiddle.net/uv8yrrav/21/ I have not changed any of your code:
<body>
<div class="outter">
<div class="testFont">▴</div>
<div class="testFont">▾</div>
</div>
</body>
Upvotes: 0