Using ttf fonts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SOR

    Using ttf fonts

    At the risk of many coffee splashed monitors .

    Can I upload a ttf font called font.ttf in the website folder and use
    that exact font to display certain text on the webspace .

    I've had good on php.net and this is closest I got .

    -----
    void swf_definefont ( int fontid, string fontname )

    The swf_definefont( ) function defines a font given by the fontname
    parameter and gives it the id specified by the fontid parameter. It then
    sets the font given by fontname to the current font.
    -----

    So can I or cant I ? .

    If so then obviously demo code required .

  • Erwin Moller

    #2
    Re: Using ttf fonts

    SOR wrote:
    [color=blue]
    > At the risk of many coffee splashed monitors .
    >
    > Can I upload a ttf font called font.ttf in the website folder and use
    > that exact font to display certain text on the webspace .
    >[/color]

    Hi SOR,

    Yes and No.

    Yes: You can use it to render text on pictures (png/jpg/gif/etc) and offer
    that images back to the client.

    No: Not in HTML (AFAIK).
    In HTML you only suggest a font that the user should use, if it is not
    present at the users machine, another font that (hopefully) resembles the
    one you suggested is used.


    [color=blue]
    > I've had good on php.net and this is closest I got .
    >
    > -----
    > void swf_definefont ( int fontid, string fontname )
    >
    > The swf_definefont( ) function defines a font given by the fontname
    > parameter and gives it the id specified by the fontid parameter. It then
    > sets the font given by fontname to the current font.
    > -----[/color]

    That is shockwave.
    If you want to offer content NOT in HTML, you have a lot of extra
    possibilities and can probably do it.

    Hope that helps.

    Regards,
    Erwin Moller
    [color=blue]
    >
    > So can I or cant I ? .
    >
    > If so then obviously demo code required .[/color]

    Comment

    • Chung Leong

      #3
      Re: Using ttf fonts

      Only on IE. Use Microsoft's WEFT tool to create an embedded OpenType
      file (.eot) then use a CCS style to link it to a page. Example:

      @font-face {
      font-family: sansSanitas;
      font-style: normal;
      font-weight: normal;
      src: url(../fonts/insane.eot);
      }

      You can then reference the font as though it's installed on the user's
      system.

      em2 Solutions, a company in Sweden, makes an excellent software that
      let you display any typeface on any browser (falling back to images if
      necessary). See the demo at www.glyphgate.com.

      Comment

      • SOR

        #4
        Re: Using ttf fonts

        <comp.lang.ph p , Erwin Moller ,
        since_humans_re ad_this_I_am_sp am...yourself.co m>
        <4302fd7d$0$110 80$e4fe514c@new s.xs4all.nl>
        <Wed, 17 Aug 2005 11:03:57 +0200>
        [color=blue]
        > Yes and No.
        >
        > Yes: You can use it to render text on pictures (png/jpg/gif/etc) and offer
        > that images back to the client.
        >
        > No: Not in HTML (AFAIK).
        >[/color]

        Thanks .

        Comment

        • SOR

          #5
          Re: Using ttf fonts

          <comp.lang.ph p , Chung Leong , chernyshevsky@h otmail.com>
          <1124302595.750 473.181040@z14g 2000cwz.googleg roups.com>
          <17 Aug 2005 11:16:35 -0700>
          [color=blue]
          > Only on IE. Use Microsoft's WEFT tool to create an embedded OpenType
          > file (.eot) then use a CCS style to link it to a page. Example:
          >
          > @font-face {
          > font-family: sansSanitas;
          > font-style: normal;
          > font-weight: normal;
          > src: url(../fonts/insane.eot);
          > }
          >
          > You can then reference the font as though it's installed on the user's
          > system.
          >
          > em2 Solutions, a company in Sweden, makes an excellent software that
          > let you display any typeface on any browser (falling back to images if
          > necessary). See the demo at www.glyphgate.com.
          >[/color]

          Saved to disk - thanks .

          Comment

          Working...