Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to use a font family other than the one in the system?

    Hi i used the following CSS code to use a font family other than the one in the control panel of the system, but in vain. Can any one help me whats wrong with the following.

    <head>
    <style>
    @font-face {font-family:myfont; src:url('./fonts/myfont.ttf');}
    </style>
    </head>
    <body>
    <P style="font-family:myfont;font-size:18pt"></P>
    </body>

    thanks in advance,
    deva

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,696
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    There’s nothing wrong. It’s just not working.

    Embedding fonts is still a PITA because no browser is supporting it except IE I believe, where you have to convert the font file into an .eot format. In a nutshell: Just forget it and use regular fonts. You can still use your special font but remember to put alternative (fallback) fonts as well, i.e.:
    Code:
    font-family: "Super special font", Arial, Helvetica, Sans-serif;

  • #3
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Quote Originally Posted by deva.vvel View Post
    Hi i used the following CSS code to use a font family other than the one in the control panel of the system, but in vain. Can any one help me whats wrong with the following.
    See the thread @font_face. To put things briefly, browser support for @font-face is poor, so it’s mostly useless.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #4
    New Coder
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Arbitrator & VIPStephan..


  •  

    Posting Permissions

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