• Resolved owen98

    (@owen98)


    I am using the Matheson theme, and I just got the WP Add Custom CSS plugin.

    I don’t know why my fonts aren’t working – these CSS rules apply to the whole website

    @font-face {
        font-family: myFirstFont;
        src: url(public_html/beautyforashes/wp-content/themes/matheson/fonts/LucidaCalligraphy.ttf);
    }
    
    .site-title {
    font-family: myFirstFont, Times, serif;
      font-size: 60px;
      margin: 0;
    }
    
    .site-description {
    font-family: Arial, sans-serif;
      margin: 0;
      font-size: 14px;
      line-height: 2;
    }

    any help would be greatly appreciated

Viewing 8 replies - 1 through 8 (of 8 total)
  • src: url(“public_html/beautyforashes/wp-content/themes/matheson/fonts/LucidaCalligraphy.ttf”);

    You forgot the ” ”

    Thread Starter owen98

    (@owen98)

    Just added those in to see if it would work, sadly the font still hasn’t changed. My .site-description font isn’t changing either, and they’re not even downloaded fonts, I don’t know what’s wrong

    Give me the link to the website, i`ll check

    Thread Starter owen98

    (@owen98)

    Ok, I see the problem. you need to override the font-family currenty applied. To do that, you need to suffix the style with “!important”.
    Example:

    .site-title {
    font-family: myFirstFont, Times, serif !important;
    font-size: 60px;
    margin: 0;
    }
    Just tested it and it worked

    Thread Starter owen98

    (@owen98)

    Thanks man, only problem is for some reason the font I downloaded isn’t working (myFirstFont). Could you help me with that?

    And as you probably saw, I’m using invisible characters to space out the title appropriately. Any advice on how to insert a break after the 3rd word? Thanks for your help.

    The font is not working because the url is not good, it can’t find it on the server. Try using the Developer Console of your browser and edit the @font-face url until it catches it and then save that url to the custom css.

    Thread Starter owen98

    (@owen98)

    Thanks a lot man, both fonts work now!

    Any possibility you would know how to insert a break in my sites’ title?

    Edit: never mind,   worked but I did not expect it to.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Fonts not working’ is closed to new replies.