Jump to content


Photo
- - - - -

The right way to add your own font


  • Please log in to reply
4 replies to this topic

#1 CliffordP

CliffordP

    Advocate

  • Members


  • 483 posts
  • LocationOklahoma
  • Country: Country Flag

Posted 04 February 2013 - 05:28 PM

What's the right way to add my own font, whether an icon font or another font?

I don't see any documentation and there are several ways I can imagine I could get it to work, but I wanted to know the recommended / future-proof / supported way to do it.

 

Thank you.



#2 CliffordP

CliffordP

    Advocate

  • Members


  • 483 posts
  • LocationOklahoma
  • Country: Country Flag

Posted 04 February 2013 - 05:41 PM

For example, I want to use this font:

Please Login or Register to see this Hidden Content

 

I saw this post (

Please Login or Register to see this Hidden Content

) but I don't think it addressed the question of using non-Google fonts and I didn't see where to upload the font file(s) to (child theme folder?). Also, for an icon font, I don't want/need it to show up in the list of font drop-downs, just to be available to use on-page.

 

Thank you.



#3 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 04 February 2013 - 09:56 PM

Hi,

 

There are two ways:

1.  Typekit.  Unfortunately, I don't know anything about this, so you will need to follow

Please Login or Register to see this Hidden Content

.  I do know it will give you a script which you'll load into Dashboard > PageLines > Site Options > Typography.   The fonts should be FTP'd to the WP root. 

2.  Cufon.  There's a link to the Cufon site right there on Typography.  You'd also get code from there.... upload your fonts to the WP root and paste the code in the Dashboard > PageLines > Site Options > Custom Code under Header Scripts.

Under Typography, you will select the tag to which the cufon font will be applied, like <h1>.

 

With either of these, you will not see the fonts in any drop downs or as selections in the pages or posts.  The way to apply is to use whatever tag was selected for application.



#4 CliffordP

CliffordP

    Advocate

  • Members


  • 483 posts
  • LocationOklahoma
  • Country: Country Flag

Posted 05 February 2013 - 03:33 PM

Let me ask another way... How does PageLines add FontAwesome to the parent theme? Said another way, how would I add an icon font (e.g. Maki, linked above) to a child theme that would be "in" the theme so I could give/sell it to someone else and it's still in there?

 

Thank you.



#5 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 05 February 2013 - 04:49 PM

Well you would follow the font authors instructions, they all vary.

For example, fontawesome is added by including the font and the icon set in a css file, enqueue the css file and the browser can use the font.

Some are javascript powered like typekit and cufon. Some are premium fonts require libraries to be loaded before you can use them.

So, it depends on the font, the type and the use case.