Search code examples
csswordpressfontsgoogle-fonts

Font looks different in wordpress that in google fonts


I'm having a problem and already search but i cant find an answer. I'm using a google font (Playfair Display) in my Wordpress site (Html5Blank Theme) but it looks very different that in google fonts. this is how they look in googlefont and my website.


This is my code

@import url('https://fonts.googleapis.com/css?family=Playfair+Display:400,700,900|Roboto:100,300');

h3 {
  display: inherit;
  white-space: nowrap;
  font-family: ‘Playfair Display’, serif;
  font-size: 10vw;
  font-weight: 400;
  text-decoration: none;
  margin: 0;
  color: #F4512C;
}
<h3>2017</h3>


Solution

  • There were problem in your quote style - Use 'Playfair Display' instead of ‘Playfair Display’

    @import url('https://fonts.googleapis.com/css?family=Playfair+Display:400,700,900|Roboto:100,300');
    
    h3 {
      display: inherit;
      white-space: nowrap;
      font-family: 'Playfair Display', serif;
      font-size: 10vw;
      font-weight: 400;
      text-decoration: none;
      margin: 0;
      color: #F4512C;
    }
    <h3>2017</h3>