Okay
  Public Ticket #1222492
Add custom @font-face to theme options panel
Closed

Comments

  •  2
    Paul started the conversation

    We have added a custom font using @font-face but we don't want to write custom CSS for every font type. We've seen your article: https://themenectar.ticksy.com/article/9773/

    But this only describes adding to the theme options panel using typekit, and our font isn't available on Typekit. Is there some code we can add to the child theme functions.php to see our font in the menu, this would be amazing and save us LOADS of time.

    Thanks for an awesome theme.

  •  9,012
  •  2
    Paul replied

    Hi Tahir

    Sorry you must misunderstand my first comment, I know how to get fonts working on the website as it's all loaded up already and I have called it in the custom CSS for H1 etc. But I now have to manually write custom CSS for every H tag, element, sub-header etc etc etc etc for the myriad of type options on the website.

    Your method in the user guide mentioned below, explains how to add the font so it appears in your typography dropdown menu in Salient, but this is only for the Typekit method.

    Is there a similar edit to the functions.php that would add @font-face fonts to the Salient Theme Options Panel -> Typography Section so users don't have to write up custom css for each element we want to use the new font on . 

  •  9,012
    Tahir replied

    Hey Again,

    I just corrected the Articlet . The code snippet works with any font and is not limited to Typekit . 

    Hope this clears the confusion.

    cheers 


    ThemeNectar Support Team 

  •  2
    Paul replied

    Hi Tahir

    Sorry we're not too bad with CSS, but our PHP is terrible!

    This code obviously references typekit and the actual font names. We have various weights of our font. Can you give me an idea of how I'd rewrite this specific to our needs? 

    Thank you!

  •  9,012
    Tahir replied

    Hey Again,

    Unfortunately there is no weight option available as this is just a hack . You can only add a font with a single weight using this method at the moment. 

    Thanks 


    ThemeNectar Support Team