Finally Use Custom Fonts

Started by G_G, May 26, 2011, 12:40:41 pm

Previous topic - Next topic

G_G

May 26, 2011, 12:40:41 pm Last Edit: May 26, 2011, 12:43:31 pm by game_guy
I found some articles reguarding some interesting stuff. You can finally use custom fonts without the viewers having the fonts installed. I thought I'd share it with all of you guys since its so orgasmtastic.

Read this:
http://www.howtoplaza.com/how-to-use-custom-fonts-on-your-website-with-css

Then read this: Don't use the example from the above link. This has an example on how to make one rule work with all browsers. It also mentions that you need to use EOT fonts for internet explorer. The last link does everything for you.
http://symphony-of-dot-net.blogspot.com/2010/03/making-css-custom-font-works-with-ie.html

Then use this to convert ttf fonts to eot (eot fonts are used for internet explorer)
http://www.kirsle.net/wizards/ttf2eot.cgi

EDIT: Heres an example file I setup.
http://www.sendspace.com/file/iwhj04

Extract and open index.php in your web browser.

legacyblade

The problem with doing this is that it increases the loading time. And only modern browsers are compatible without using javascript workarounds.  I'm glad this method exists, but it'll be a few years before the majority of web users will be able to see our custom fonts (a pretty big share of internet users use old outdated browsers. Thankfully IE is on a rapid decline in use)

G_G

Yea...one of my grandmas older computers (xp laptop) only has IE 6 I think. As long as the browser supports CSS2 and the developer of the website defines an EOT font for I.E. and a font for the other browsers, you'll be able to see it. most computers now have IE 8 or 9 (as in most new computers) so it'll work just fine. But yea I totally agree with you.

Blizzard

IE9 is actually quite decent. IE will experience a rise in usage, but this will take a while because of the bad reputation.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

Either way, I'm sure this method has been around for a bit and now I'm mad at my web teacher for not letting me use the font I wanted >:U My sites done and graded already. Meh.

legacyblade

It's been awhile since I read up on CSS (web design was my job for awhile, before my employer decided to have me retrained as a marketer  :O.o: ), but I'm pretty sure external font files are a CSS3 thing. But I'm probably confusing that with SVG fonts.

@Blizz, I'm pretty sure IE9 STILL doesn't support min/max width. Now for a fixed width, there's no problem. But if you like "elastic" web design (where it's scalable, but you put limiters on the sizes of certain things just to keep it looking pretty on huge or tiny monitors) as much as I do (90% of my web layouts have been elastic), it's REALLY annoying. You have to use workarounds just to get IE to have a feature EVERY other browser has.

Though to be fair, Microsoft is finally making their browser decent. I'm glad. I just have gripes with IE6 and IE7. IE8 wasn't THAT bad unless you were doing fancy things. I'm glad they're taking steps to improve the default browser of the web :P

Blizzard

*opens CP in IE9* Min width works just fine.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.