17

I am using the Open Sans font on a web site, but it appears much thicker in all browsers than in Adobe Illustrator (see attached images). Why is this and is there any way I can get the font in the browser to display "thinner" please?

Illustrator

Browser

Note Both the browser and Illustrator are rendering the Semibold weight (600)

RunLoop
  • 20,288
  • 21
  • 96
  • 151
  • WRT your edit: Is your question how to make the browser use a thinner font than weight 600? – Mr Lister Jan 29 '15 at 14:56
  • 1
    Please post the HTML and CSS code you are using. It is normal to have fonts rendered differently by different programs, but the difference here looks too big to be explainable by that alone. – Jukka K. Korpela Jan 29 '15 at 17:56

4 Answers4

46

The issue was with aliasing. The following css solution will work for safari, chrome and firefox:

-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
RunLoop
  • 20,288
  • 21
  • 96
  • 151
  • Thank you so much! – Nikolay Tsenkov Sep 18 '16 at 14:08
  • 2
    Can anyone explain why this works and what we're losing by setting this? – Matt Apr 12 '19 at 18:42
  • 1
    @Matt "Smooth the font on the level of the pixel, as opposed to the subpixel. Switching from subpixel rendering to antialiasing for light text on dark backgrounds makes it look lighter" - https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth – ESR Feb 20 '20 at 20:38
  • Love this. So much cleaner. Should be the default behaviour in my opinion – gkpo Apr 28 '21 at 07:18
4

Make sure you're including the light (300) and normal (400) weights for Open Sans, then you can simply:

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300; /* Or 400, if 300 is too light. */
}
James Donnelly
  • 126,410
  • 34
  • 208
  • 218
0

The Open Sans Webfont comes in 10 styles. For me it looks like the browser displays the semibold one. It should be regular and you should go fine.

Take a look at fontsquirrel

http://www.fontsquirrel.com/fonts/open-sans

moeses
  • 497
  • 1
  • 6
  • 21
-1

The simple answer is that there isn't a fix. If you are properly loading and calling the desired style and weight, then sometimes things just render differently between adobe and web browsers (or browser to browser). Your options are to go to 400 weight or learn to love the boldness.

JustH
  • 1,372
  • 8
  • 8