Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different font size just for Firefox

I am just adding a account header for my website, that just displays the players username.

I am using a custom font and it works fine on chrome and IE, however for Firefox, it doesn't display the custom font and just displays the next available font which is Verdana. I don't mind that, however my problem is that the font Verdana is smaller in size than my custom font, so if i set it to 7.5pt as font size, the custom font appears twice the size. Is there anyway i can set the font size higher just for Firefox?

Here is the css for the div that the username is in:

font-size: 7.5pt;
color: #9f1717;
text-align: center;
font-family: xirod, xirodeot, Verdana, Geneva, sans-serif;
like image 511
Al Hennessey Avatar asked Dec 06 '22 15:12

Al Hennessey


1 Answers

I suggest either using a font format that Firefox supports, or using font-size-adjust to get uniform sizes across different font families.

You can use font-size-adjust by adding the following CSS:

font-size-adjust:0.5;

This will set all fonts to have approximately the same height lowercase characters (which, in general, produces text that appears to be closer to the same size when viewed with different fonts applied).

like image 74
0b10011 Avatar answered Jan 01 '23 04:01

0b10011