Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
[TUTORIAL] How to use custom fonts using CSS
Old 01-16-2010, 09:12 AM [TUTORIAL] How to use custom fonts using CSS
Super Talker

Posts: 142
Name: William
Trades: 0
Now comes my time to give a little back to this community for what I have learned,
I litterally learned this about... 5 minutes ago but it is VERY useful.

If you want to use your own custom font you will need the font file and upload it to your website (in a folder called fonts or whereever you want it to be but putting it in fonts will keep your server tidy.)

in css we need to put this code:

Code:
@font-face {
font-family:"customfont";
src:url (/font/"customfont.ttf) format("truetype");
obviously replace custom font with the font you want to use.

the next part would be to apply it to a style since you have defind the font and where it is all you need to do now is:

Code:
h1 {
font-family:"customfont";
}
that way anyone can see your website with that font

if anyone notices an error in this, please respond so i can update this post with the correct formula.

Last edited by UUilliam; 01-16-2010 at 09:30 AM..
UUilliam is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-16-2010, 10:20 AM Re: [TUTORIAL] How to use custom fonts using CSS
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
that way anyone can see your website with that font
Not until ALL browsers support CSS 3 you won't

http://www.css3.info/preview/web-fonts-with-font-face/
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-16-2010, 10:39 AM Re: [TUTORIAL] How to use custom fonts using CSS
Super Talker

Posts: 142
Name: William
Trades: 0
hm?
I just tested all my browsers with that website, they all return almost the same (firefox differed the most, just font size...)
Browsers I have:

Firefox
Chrome
Safari
Opera
internet explorer

I dont understand what you ment to show with that website :S

I understand what you mean by not all browser will support it though
surely those browsers will be outdated though and most website will no longer work on them at all anyway so the user will likely upgrade their browser?
UUilliam is offline
Reply With Quote
View Public Profile
 
Old 01-16-2010, 10:40 AM Re: [TUTORIAL] How to use custom fonts using CSS
Average Talker

Posts: 20
Trades: 0
Thank you for the tip - I never knew that you could do that.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
trafficke.com is offline
Reply With Quote
View Public Profile
 
Old 01-16-2010, 12:35 PM Re: [TUTORIAL] How to use custom fonts using CSS
GeekSpecialties's Avatar
Super Talker

Posts: 132
Name: Leonard
Location: Minnesota, USA
Trades: 0
There is a cool new service that takes case of this for you and you use their library of fonts, so your don't have to worry about proper licensing and fees.
http://typekit.com
__________________
Len,

Please login or register to view this content. Registration is FREE
.
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

GeekSpecialties is offline
Reply With Quote
View Public Profile Visit GeekSpecialties's homepage!
 
Old 01-22-2010, 01:21 PM Re: [TUTORIAL] How to use custom fonts using CSS
Junior Talker

Posts: 1
Trades: 0
Useful tips UUilliam, though a little too much if associated with some reading about the site performance - (optimization css - optimasi css). Having the smallest outlook.ttf with 18K and the largest times new roman with 400K, is it necessary embed one of them into 20K css file ?. But, I just need your advice if you have a link that can compress that fonts. FMIIW
Greatfull thanks.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
SmallD is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to [TUTORIAL] How to use custom fonts using CSS
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27159 seconds with 12 queries