PDA

View Full Version : Can you add custom fonts to vbulletin and use them in styles?


JMEWLS`
10-25-2012, 02:24 AM
Not for posting...

www.nbadimensions.net/forums/

Basically all of the headers there are images, I'd much rather them be text rather then images in the same format.

--------------- Added 1351137325 at 1351137325 ---------------

I've tried @font-face...

@font-face {
font-family: 'customfont';
src: url('images/nbadv2/font/custom.ttf');
}

Doesn't work when I put it into code..


<div style="font-family:'customfont';">NBA DIMENSIONS</div>

--------------- Added 1351139606 at 1351139606 ---------------

wtricks
10-25-2012, 03:17 PM
I usually put it my my 'extras' CSS. Additional or whatever it's called (have done too much xenforo design lately, so I lost the name). Don't use inline styling, it ads more 'junk' to your code and it's 'dirty'.

here's how I set a custom font for my forums


@font-face {font-family: topcom; src: url('img/com.ttf');}
h1 {font-family:topcom;} /* the element that needs styling */


Hope it makes sense ;)

PS: make sure the font is where it's supposed to be. I usually mess up the path to it and wonder why it doesn't work :D

Lynne
10-25-2012, 03:41 PM
There was a thread about this over on vbulletin.com. I'd suggest you do a search if what wtricks wrote isn't helping.