Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using CSS @Font-Face / Google Fonts gives different sizes for numbers and letters

The following code produces the text Hello 7432832 KB but the size of the letters is larger than the size of the digits by a few pixels. Yet in Google Fonts it appears well and in the same size...

image

Here's the code:

@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);
    
body {
  font-family: "Source Sans Pro";
  font-weight: normal;
  font-style: normal;
  font-variant: normal;
}
<body>Hello 7432832 KB</body>

Any ideas?

like image 523
Eeko Avatar asked Dec 11 '25 21:12

Eeko


1 Answers

It looks like a problem with the font itself - on small font-sizes it appears faulty, but in large font-sizes (such as the default Google Fonts preview size), it appears well.

Very irritating. I wasted too much time on this.

I will open a bug in the Github repo.

like image 80
Eeko Avatar answered Dec 16 '25 22:12

Eeko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!