• @font-face not working properly
    6 replies, posted
Well I orginally posted this on the myBB forums but because they are less than helpful (fucking suck) I have gone along and decided to post this here So fruitpunch.... I designed this site with the idea that the forums would be in their own section with little to no supplement but still stay consistent in the design [url]http://almost-there.org[/url] Here as you can see on the menubar [quote]Forums Fridge IRC Servers Gadgets Steam[/quote] The fonts are part of the "Ubuntu" Font family And they are working properly using this document [url]http://www.almost-there.org/style/fonts/importUbuntu.css[/url] But on the Forums [url]http://almost-there.org/forums/[/url] The font is not being correctly imported/applied And since in mybb PHP import is not supported and is too hacky to implement. I decided to clone this stylesheet document into the mybb Themes stylesheet listing in the ACP I realized that since the fonts will not reside in the same folder as the CSS document I would have to add the proper sub-URL so it may be pointed to the correct place. So instaid of [code]src: url('ubuntu-r-webfont.eot?#iefix') format('embedded-opentype'),[/code] It would be [code]src: url('styles/fonts/ubuntu-r-webfont.eot?#iefix') format('embedded-opentype'),[/code] Iv'e tried a few variations of this with little to no luck. Its also been very difficult to test since I have the Ubuntu font installed locally on my computer. I see the font weather or not its being imported from almost-there or not. I have run out of ideas at this point.
Use google. [code]<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet' type='text/css'>[/code]
[QUOTE=jaybuz;33205869]Use google. [code]<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet' type='text/css'>[/code][/QUOTE] Google fonts is awesome but potentially I am also going to be using TF2secondary on here as well [url]http://www.almost-there.org/style/fonts/importTf2.css[/url] And Google does not host that font (Sorry to be such a pain in the ass and much respect to you) :D
Then use Font Squirrel @font-face Generator with the original font file: [url]http://www.fontsquirrel.com/fontface/generator[/url]
I did that to get the fonts into almost-there.org/styles/fonts/ The problem still resides that the font files cannot be accessed when within myBB Not that they are configured incorrectly outside of the forums. its just when within the forums we have this problem. Is there a way to see what fonts the forums are trying to access when loading the page? Iv'e looked through and through the chrome inspector and firebug but I don't see anything that can help me here. Iv'e tried different URLs (I haven't mastered this yet) Such as src: url('ubuntu-r-webfont.eot?#iefix') format('embedded-opentype'), src: url('style/fonts/ubuntu-r-webfont.eot?#iefix') format('embedded-opentype'), src: url('/style/fonts/ubuntu-r-webfont.eot?#iefix') format('embedded-opentype'), src: url('http://almost-there.org/style/fonts/ubuntu-r-webfont.eot?#iefix') format('embedded-opentype'), None of which work :/
Try viewing the Network info in Firebug or Chrome Inspector
Ill check that out I think Im also going to make a bunch of <span style="font1"> <span style="font2"> <span style="font3"> And make the CSS sheets with a bunch of different fonts in different formats to test the shit out of it. [editline]9th November 2011[/editline] Well I found out that the forum software reconises that the URL in the CSS is that of "almost-there.org" is on the same URL of the forum software and automatically removes that and shortens it, the problem is since the forum is in its own sub directory this prevents me from externally/internally loading the font files. So in short I put the fonts inside the same directory as the forum software and it works >_> Most retarded way of doing things just to save a few characters of code.
Sorry, you need to Log In to post a reply to this thread.