Results 1 to 2 of 2

Thread: Embedding font variants?

  1. #1
    Join Date
    Mar 2005
    Location
    Western Australia
    Posts
    148
    Thanks
    24
    Thanked 4 Times in 4 Posts

    Default Embedding font variants?

    Hi guys

    Just wondering is it possible to embed font variants, as in the regular, bold and italic variants.

    I ask as I have a site in development that is using Trebuchet MS as the default font (Arial/Helvetica as backups) and it works fine where the text is not in bold or in italics, but if there is bold and italics the font gets those parameters applied to the regular font instead of using the correct ttf font for those variants.i.e. it uses the standard regular ttf file (trebuc.ttf) rather than using the bold (trebucbd.ttf) and italic (trebuc.it.ttf) ttf files (and eot's for IE)

    So for example I have as standard

    Code:
    @font-face {font-family: Trebuchet MS; src: url("/fonts/trebuc.eot") } /* EOT file for IE */ 
    @font-face {font-family: Trebuchet MS; src: url("/fonts/trebuc.ttf") } /*  TTF file for CSS3 browsers */
    * {font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; margin:0; padding:0;}
    but how would I add the
    trebucbd.ttf and trebucit.ttf (and the eot versions)?

    If I just add them as
    Code:
    @font-face {font-family: Trebuchet MS; src: url("/fonts/trebucbd.ttf") }
    the browser will use the last font listed only, so if this is after the first two then all is using the bold font variant.

    Hope I make sense

    Cheers
    1st rule of web development - use Firefox and Firebug
    2nd rule - see the first rule
    --
    I like Smilies

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You could always avoid the problem and simply have two different css declarations for the two types of font: define for <strong> and <p> differently, or whatever tags you may be using.
    Sorry this doesn't answer your question, but I'm not sure if there is an approach that would work directly to solve that.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •