MyBB Community Forums

Full Version: @font-face issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Has anyone tried using the @font-face CSS tag in MyBB themes?

I'm really trying to make it work, here...but I keep getting errors. Maybe another pair of eyes to help me out?

@font-face {
  font-family: 'Poplar';
  src: url('webfontkit/poplarstd-webfont.eot');
  src: local('☺'),
         url('webfontkit/poplarstd-webfont.woff') format('woff'), url('webfontkit/poplarstd-webfont.ttf') format('truetype');
}

.thead {
        font-size: 26px;
        font-family: Poplar, Lucida Grande, Arial, sans-serif;
	color: #f2e3c0;
}

That's the tag I am using and the place I want to use it...any ideas on why it's not working?
It's not going to work with @. MYBB parses CSS into the DB and it expects a certain format. You'll have to make core file edits. May I suggest you make sure CSS is in the filesystem cache under ROOT/cache/themes. Then just manually edit the css file. Be aware any css changes in admincp will overwrite your custom edits but if you're not excessively changing your theme layout this should be okay.
Unfortunately, manually editing the cache/themes/global.css file didn't produce anything. I have an alternative for now and perhaps when the rest of the theme is finished, I will work on getting it to show up.

Thanks for your suggestion, though! I'd really like to use the @font-face to spice up the category headings and such, so perhaps more research can be done on this in the future Big Grin
Which fonts are you wishing to use? Have you tried the google web fonts service?
Poplar Std....and no, I hadn't. I'll check it out Big Grin
http://code.google.com/webfonts

If not just add it in header include template in style tags.
And once again...Google proves itself to be genius.

THANKS MUCH, guys! Everyone was super helpful. This is my first time skinning a myBB forum, so your prompt responses have been awesome Big Grin
Ah...the google web fonts DID solve my issue, but I have another question.

Do I have to insert the code into every template's <head> area? Or is there one page that will allow me to set a more global command?