2

I'm using the Google font 'Open Sans', and while it seems to be displaying properly on my local machine's Chrome browser, the font is much bolder when I view the same page uploaded to my web server.

Inspecting the element (an H2) styles in Chrome both locally and on the server, shows:

  • font-family: 'Open Sans', sans-serif, Arial;
  • font-weight: 600;

However, looking at the 'computed' tab of the Inspector, and scrolling down to 'Rendered Fonts', I see 'Open Sans Semibold—55 glyphs' locally, and 'Open Sans Extrabold—55 glyphs'on the server.

Mattypants
  • 514
  • 5
  • 15

1 Answers1

0

Provide a font-weight by default as in

.myClass{
   font-family:'Open Sans';
   font-weight: 700;
}
Hello Universe
  • 3,248
  • 7
  • 50
  • 86
  • What's the difference in using a class or an H2 selector? – Mattypants May 16 '15 at 10:15
  • There is no difference. However, notice the font-weight is in number. If you say bold, different browsers will consider different numbers. So better to add a number. 700 is typical number for bold. – Hello Universe May 18 '15 at 09:23
  • I didn't specify bold anywhere. I specified only what is displayed in the inspector, i.e., font-weight: 600. Semibold and extrabold are only displayed as the 'Rendered Fonts', in the 'Computed' tab of the Inspector. – Mattypants May 18 '15 at 11:08