SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    Non-Member
    Join Date
    Oct 2004
    Location
    Indiana
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css2 font properties

    Hey all,
    I have been trying to use some of the font properties for CSS2 like:

    font-stretch

    I can't seem to get it to do any expanding, or condensing. Has anyone had any luck with this? I also tried use the @font-face rule to use my own fonts. I had no luck on that either.

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Browser support for some CSS 2 properties is not good yet.

    Here is a list if you look in the right columns it tells what browsers support each property.

    The font-stretch: does not have support yet.

    I have never heard of @font-face, but you can use font-family: to use particular fonts.

    Hope this helps

    Johnny

  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    @font-face was in CSS 2.0, but was removed from CSS 2.1 due to lots of issues, the main being copyright. @font-face was used to embed nonstandard fonts (kinda like how Flash can do it), but that would have caused lots of copyright/legal issues because of the status of most fonts.

    As for font-stretch, I don't think any browser has that working yet.

  4. #4
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    @font-face was in CSS 2.0, but was removed from CSS 2.1 due to lots of issues, the main being copyright. @font-face was used to embed nonstandard fonts (kinda like how Flash can do it), but that would have caused lots of copyright/legal issues because of the status of most fonts.
    Too bad, that would be kinda cool. I am cool with standard fonts, but it would be fun to play around with non standard ones.

    Johnny

  5. #5
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Johnny Gulag
    Too bad, that would be kinda cool. I am cool with standard fonts, but it would be fun to play around with non standard ones.

    Johnny
    The problem would be (as with anything in HTML) that the font would have to be downloaded to the user's machine. Flash gets away with it because .swf is a binary format and you can't (easily) grab the fonts out of the swf.

    Of course, you could always use sIFR as a way of using nonstandard fonts, or do what I tend to do and specify good alternate fonts, like so:
    Code:
    p {
      font-family: Frutiger, "Myriad Web", "Trebuchet MS", "Bistream Vera Sans", sans-serif;
    }

  6. #6
    Non-Member
    Join Date
    Oct 2004
    Location
    Indiana
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yah I figured browser support was this issue. I like to use Century Gothic and stretch it out, like on this logo font: userunfriendly.com/newuu/

    I was hoping I could pull of something like that with the stretch property. Century Gotchic looks bad on webpages, really choppy, so I was just going to use it with Arial. Guess not!

  7. #7
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    You could try: letter-spacing: ?px; but I dunno if it will have the same effect as what you want from stretch

    Later
    Johnny

  8. #8
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For IE at least, there is a tool called WEFT which will let you embed nonstandard fonts. It is a Microsquish program, so it'll only work in IE, and I believe it requires the use of some MS elements that will invalidate your CSS.

    On the upside, it doesn't break anything for Firefox/Opera et al . . .


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
  •