Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: TTF Font File on Website doesn't work...

  1. #1
    Join Date
    Oct 2007
    Location
    Germany, Berlin
    Posts
    41
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default TTF Font File on Website doesn't work...

    Hi people,
    need help! I put that in a stylesheet
    Code:
    @font-face {
    	font-family: "Bell Centennial Sub-Caption BT"; 
    	src: local("Bell Centennial Sub-Caption BT"),
    	url("font/BELCESUB.TTF")
    	format("TrueType"); }
    but it doesn't work except if I open a font program having the font installed on my computer. Does anybody have a solution?!

    greetings
    Max
    Last edited by ReMaX; 11-09-2007 at 03:31 PM. Reason: grammar ;q

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If this is for the web, forget about it. You have no control over the fonts other users have installed. If it is only for your local use, make sure that the font is installed on your computer as available to all programs, or at least to the browser(s) you are using, and use a normal font declaration, like:

    Code:
    body {
    font-family:"Bell Centennial Sub-Caption BT";
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2007
    Location
    Germany, Berlin
    Posts
    41
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    It is for the web and that's why there is an attribute called "src: url(...)" but for some reason it doesn't work. I've already checked the path. Anybody else an idea?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I believe that this form of font embedding is not yet supported in most browsers.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    I believe that this form of font embedding is not yet supported in most browsers.
    Even if it were, I doubt local, as in:

    Code:
    src: local("Bell Centennial Sub-Caption BT"),
    would cut it for a live page.

    ReMaX, where did you find out about this technique? Here's the specification:

    http://www.w3.org/TR/REC-CSS2/fonts....t-descriptions

    If you provide a fall-back generic face, as instructed at the above link, at least those browsers without support for the technique will render something of your choosing. Also, you will note that the src cannot be local for a live implementation.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Oct 2007
    Location
    Germany, Berlin
    Posts
    41
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your answers but it really doesn't work. Only if I have installed the font! Perhaps I did not understand it very well . Once again, here is the Code - what I really need of it, right.
    Code:
    @font-face {
            font-family: "BellCent SubCap BT";
            src: url("font/BELCESUB.TTF"); }
    body {
            font-family: "BellCent SubCap BT"; }
    ...by the way, I think I've found this technique on a selfhtml page. There is a plethora ( ) of knowledge about html and css but they're not up to date and do not fullfill the rules of w3c in every way.

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's true. However, as I've said, while this is fine according to the specification, it hasn't been implemented in most major browsers yet.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by ReMaX View Post
    Thanks for your answers but it really doesn't work. Only if I have installed the font!
    If you were to carefully read the specification, I believe you would find that is one of several levels of support browsers may afford this technique.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default TrueType Webfonts are possible

    Webkit is one of the first browsers supporting Web fonts. Meaning you can use @font-face in your CSS. With older browsers you can still do this when you install True Font Family. You do need a PHP server with GD (comes standard from version 4.3). Another alternative would be sIFR.

    Edit: True Font Family is a commercial product. However, even though this is a blatant plug, I am leaving the link intact, as it is very much on topic. If however, I see references to this product in less appropriate locations around the forum, the link will be removed and the user issued infraction points, possibly banned.
    Last edited by jscheuer1; 11-15-2007 at 01:57 PM. Reason: add advisory

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Both alternatives require Javascript, and use images (seriously harming accessibility and probably wrecking your page layout in many browsers/setups).

    TFF also doesn't appear to work on Konqueror.

    P.S. it took me eleven minutes to break your pro version. Either you're good, or it's because I just woke up. I'm impressed.
    Last edited by Twey; 11-15-2007 at 09:38 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •