Re: Font, layout units et al.

From: Joaquín Cuenca Abela (cuenca@pacaterie.u-psud.fr)
Date: Sun Jun 02 2002 - 10:46:01 EDT

  • Next message: Joaquín Cuenca Abela: "Re: Font, layout units et al."

    On Tue, 2002-05-28 at 19:48, Leonard Rosenthol wrote:
    > At 9:21 AM -0700 5/28/02, Joaquin Cuenca Abela wrote:
    > > > I am no expert on these things at all, but Leonard
    > >> is,
    > >
    > >neither me. I'm more than eager to ear Leonard
    > >advices here.
    >
    > I sent a response - let me know if you didn't get it...

    yes, I've got it. It's just that I'm slow understanding all that :(
    sorry

    > >The scaling from the "high-size" to the "low-size"
    > >(say 12 points) has nothing to do with the resolution
    > >that we'll use in the device. It's a non-linear
    > >scaling that typographers do to make the font more
    > >readable at tiny sizes (making the font relatively
    > >wider at low physical sizes). That way, for instance,
    > >the "m" get the steams clearly readable even at low
    > >sizes.
    >
    > This isn't as true with outline fonts as it once was with
    > bitmapped fonts. With outlines, the same vector data (and glyph
    > metrics) is used regardless of size - it is simply transformed to a
    > new size. HOWEVER, the font author may have included "hinting" for
    > smaller sizes, so that things (such as the "m" stems look better).

    ok. I though that truetype fonts changed metrics & vector data in
    function of the physical requested size. Metafont did that, and I was
    just extrapolating.

    > >So the metrics for a font at 12points can be (will be)
    > >different from the metrics of the same font at
    > >240points.
    >
    > Better not be! Metrics of an outline font are computed by
    > taking the base metric stored in the font format and multiplying by
    > size (and a few other little things).

    I remember an example in the TeXBook (or was it in the Metafont book?),
    where Dr. Knuth put a 'm' rendered at 8 points and linearly scaled to 14
    points next to a 'm' rendered at 14 points. The difference was clearly
    visible (the 'm' at 8 points was wider than the 'm' at 14 points).

    I just though that TrueType did the same stuff when you rendered text at
    different physical sizes.

    I stand corrected.

    > >Now, once you have the font at 12points, you still
    > >have to render it to your device.
    >
    > That's 12pts at 72dpi. If the dpi changes, then you need to
    > request the font to be re-rendered at a different
    > size/scale/transform. FreeType handles this for you by simply
    > specifying output resolution and/or transformation when you request
    > the glyph bitmap.
    >
    >
    >
    > >In your screen, things are different. The font have
    > >to be grid-fitted to a low resolution device, and that
    > >creates artifacts, that good hinted fonts should
    > >remove.
    >
    > Grid-fitting is a different problem and AFAIK, AbiWord
    > doesn't deal with it right now. And again, FT2 will address this
    > for us with the hinting and anti-alias algorithms.

    Well, AbiWord delegates right now font rendering to the X core font
    system. The X core font system does all the hinting stuff (using FT2
    for truetype fonts).

    With my patch AbiWord delegates font rendering to Xft, who itselfs uses
    FT2 to render the fonts, and it copies the glyphs to screen using the
    fastest method available (ie, XRender if available, X core functions
    elsewhere).

    Thank you very much for your patience, Leonard!

    Cheers,

    -- 
    Joaquín Cuenca Abela
    cuenca@pacaterie.u-psud.fr
    


    This archive was generated by hypermail 2.1.4 : Mon Jun 03 2002 - 04:13:09 EDT