Re: JavaScript & Fonts

From: Mark E. Shoulson (mark@kli.org)
Date: Mon Nov 02 2009 - 11:58:30 CST

  • Next message: David Starner: "Re: JavaScript & Fonts"

    On 11/02/2009 10:46 AM, Jukka K. Korpela wrote:
    > vanisaac@boil.afraid.org wrote:
    >
    >>> My conclusion is that in cases like this, an author should create a
    >>> suitable image of the character, in the intended environment–in
    >>> practice, a button of the same style as those based on characters
    >>> when rendered in a typical way. That is, to take an image of the
    >>> button rendered using some nice font (DejaVu Sans?) and edit it in a
    >>> graphics program to make it somewhat more legible.
    >>
    >> There is one big problem with this approach, which is that images
    >> don't generally scale.
    >
    > Images can be scaled, and browsers have become better in this. You can
    > use an image in an HTML document and set its height in em units (i.e.
    > relative to font size) in CSS, and browsers will scale it accordingly
    > (preserving the width to height ratio). This is not ideal, and it would
    > be better to be able to use characters, but in a situation like the one
    > discussed, it's probably the best approach in practice. - Besides, the
    > page discussed sets font size in fixed units, thereby declaring text to
    > be non-scaleable (though browsers may ignore that).

    Images don't scale *well*, though. Hence the need for Scalable Vector
    Graphics (SVG), which do. If you want to use an image, try using SVG.

    ~mark



    This archive was generated by hypermail 2.1.5 : Mon Nov 02 2009 - 07:00:12 CST