• Resolved justwander

    (@justwander)


    Hello,
    I am trying to figure out how to access fonts on my site’s server and not having any luck.

    1. The font folder is placed directly in the theme folder.

    2. The following is placed at the top of style.css:

    @font-face {
    font-family: "sitetitle;
    src: url("../Fonts/Raleway-Black.ttf");
    } 

    3. To be sure I am using the correct call from style.css I placed a system font that is not used in the theme as the first alternate. That way I can tell that my call for the font is going to the right place.

    Is the font folder in the correct place or is my css call wrong?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Is it your own theme which you want to advance? Or is it a child-theme you created?

    Why don’t you use an absolute path to the font files? E.g. /wp-content/themes/yourThemeName/Fonts/Raleway-Black.ttf

    Thread Starter justwander

    (@justwander)

    @threadi,
    I am using a child of the Storybook theme.

    The absolute path did not work, but the alternate fonts works really well.

    I did add the quote mark I missed in the @font-face call:

    
    @font-face {
    font-family: "sitetitle";
    src: url("../Fonts/Raleway-Black.ttf");
    } 
    Thread Starter justwander

    (@justwander)

    Figured it out.

    Everything I read online said the source should read
    ../fonts/Raleway-Black.ttf

    It should read this way
    fonts/Raleway-Black.ttf

    Thanks for your reply @threadi!

    Thanks for the reply. Could you please mark the topic as solved?

    Thread Starter justwander

    (@justwander)

    I thought I did.

    Maybe I hit the wrong button!?!

    Thread Starter justwander

    (@justwander)

    Closed

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Accessing Fonts When Serving From Site’ is closed to new replies.