Rare Font

Discussion in 'CSS' started by protocol96, Oct 29, 2007.

  1. #1
    What happens on the user pc, if I am using not commonly available english fonts and its not available on their pc.

    I heard default font is displayed and if I am using non english fonts, I will get weird characters. Can somebody please confirm!!
     
    protocol96, Oct 29, 2007 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It all depends on what character set you're using. How is your page being saved (and served)?
     
    Dan Schulz, Oct 29, 2007 IP
  3. protocol96

    protocol96 Peon

    Messages:
    413
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    character set is UTF-8

    I will rephrase my question, suppose if I use Garamond and its unavialable on user pc, how will those english characters be displayed to him.
     
    protocol96, Oct 31, 2007 IP
  4. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #4
    font:1em Garamond, Helvetica, Arial, sans-serif;

    If the user doesn't have Garamond it will try Helvetica.. if he doesn't have Helvetica then Arial.. and if for whatever reason he doesn't have Arial it will display as sans-serif.
     
    soulscratch, Oct 31, 2007 IP
  5. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You forgot to set the line height there, soulscratch. ;)

    
    font: 1em/1.2 garamond, helvetica, arial, sans-serif;
    
    Code (markup):
    Oh, and Garamond is a serif font, not a sans-serif one.
     
    Dan Schulz, Oct 31, 2007 IP
  6. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #6
    I just tried to make a minimal example. While we're on the topic of line-heights, is there a difference between 1.2em and 1.2? There shouldn't be, right?
     
    soulscratch, Oct 31, 2007 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #7
    As far as I can recall, there's no difference when it comes to line-heights. I could be wrong though. I normally declare the unit anyway out of force of habit.
     
    Dan Schulz, Oct 31, 2007 IP
  8. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I thought 1.2 was considered 120%. So I would say that was also 1.2 em.

    To answer the main question though, assuming you don't do what soulscratch did (though you should);

    If you state Garamond alone as a font, and the user doesn't have it, the user's browser will usually display Times New Roman at between 12 and 16 pixels high (this depends on the browser's configuration and own style sheet-- most people don't change these). It's the most common default browser font for Western browsers.

    I have very few fonts. Many pages with nothing declared show up for me as Times New Roman (one of like 3 fonts I have). If you want a sans-serif font to always show up, add sans-serif after your other font names.
     
    Stomme poes, Oct 31, 2007 IP