This is coming soon!

Using custom font on your MyBB forum.

Discussion in 'Mybb' started by kavin, May 11, 2011.

Oh noes!

You need 20 posts to be able to download resources, post links and other things. Read more...
  1. kavin AF Power User

    Usually MyBB provides fonts such as Verdana, Arial, Sans-Serif for displaying texts. The font-family css property is used to choose any one font between this group depending upon what the user's PC has.

    Consider, when you want to use a custom font such a Steiner, Diavlo, etc to add a different look to your forum. It won't be supported as such as Visitors might not have such fonts installed on their PC.

    For this you can follow this simple method to use any custom font to your forum.
    • Download the desired font. You have to have it in both .ttf and .eot format(to add IE support).
    • Most of the fonts are only available in .ttf format. So you have to convert .ttf file to .eot using an online converter.
    • In this tutorial, i will take Steiner font as example. So i now have Steiner.ttf and Steiner.eot files.
    • Upload them to your Forum's root.
    • Now navigate to ACP>>Templates and themes>>Themes>>Select your theme>>global.css. Go to "Advanced Edit" option.
    • At the bottom of the global.css file, just add this following code.
    • Replace the Name Steiner, with the name of your Font and your-domain.com with your Forum URL.
    • Now find "font-family" in global.css. It is present in "body, table, textarea, codeblock code" properties.
    • It will show something like this...
    • Add the name of your Font (in this case "Steiner") to first of the list. It will show as below.

    Do it for all font-family properties in "body, table, textarea, codeblock code", or just for the ones you needed.
    That's it. Your users will see a custom font, even though its not installed in their PC.

    Please link back to this topic if you copy this article.
  2. JuiceX Awesome Member <3

    Very nice. :)
  3. kavin AF Power User

    Thanks Juice.
  4. Rain New Member

    Thanks :D
  5. electroman New Member

    Nice tip Kavin! +rep for you!
  6. kavin AF Power User

    Thanks for the Rep, electroman.
  7. x86cam New Member

    thanks, i added it to my mybb install
  8. kavin AF Power User

    Good luck. I hope you like it.
  9. cheeseface ¢ℓαѕѕιƒιє∂..

    Great article but I think this belongs in MYbb :)
  10. ShadyX Who else?

    Moved to the correct section ;)

    Next time you see a post or thread you believe is in the wrong section please report it so we can move it swiftly.