SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: Force Font

  1. #1
    SitePoint Addict
    Join Date
    Sep 2011
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Force Font

    Hi, there is a specific font that i have used in a certain section of my website design. I know that this font will NOT be on 99.9% of my users computers... so is there a way to apply this font to certain text, without having to use images for the text...

    If you can suggest away, can you confirm that it is compatible across all browsers...

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    The best way to do this these days is to use @font-face. This means that you place the font files on your site so that most or all users will have access to them. Of course, you need to have permission to use the font this way, but there are thousands of fonts available for this purpose. You can find lots of free ones at the FontSquirrel site, and Google also has free fonts you can use. Or you can head over to sites like FondDeck and TypeKit and pay a small fee for the rights to use the font on your site. So there are lots of options nowadays other than images.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Addict
    Join Date
    Sep 2011
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok cool, thanks... does this work on all browsers... and can you set a secondary font such as arial if the browser does not support it...

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by oo7ml View Post
    Ok cool, thanks... does this work on all browsers... and can you set a secondary font such as arial if the browser does not support it...
    Yes, certainly. It's well supported across browsers, and you can set the usual fallback fonts, too. You just put the embedded font at the start of the list, and have all your fallbacks listed after that.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  5. #5
    SitePoint Addict
    Join Date
    Sep 2011
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok cool, thanks... final question... do you think it would be better to use the @font-face (using your own font files) or google web fonts (linking to their server) as i have found a font on google web fonts that is very similar...

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Personally, I don't like Google fonts. (I've not found them too reliable ... but it may depend on the particular font in question.) In my experience, the FontSquirrel fonts are the most reliable, so firstly see if they have the font you are after.

    I don't think it's a problem to link to a font external to your site, though. It may actually load faster (as those big sites often optimize their delivery). I've used both TypeKit and FontDeck, which serve up the fonts for you, and they both work fine.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  7. #7
    SitePoint Addict
    Join Date
    Sep 2011
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok cool, thanks Ralph


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •