Re: Font, layout units et al.

From: Joaquin Cuenca Abela (e98cuenc@yahoo.com)
Date: Tue May 28 2002 - 03:34:00 EDT

  • Next message: Martin Sevior: "Re: screenshot of ugly fonts"

    --- Leonard Rosenthol <leonardr@lazerware.com> wrote:
    > At 10:26 PM +0200 5/27/02, Joaquín Cuenca Abela
    > wrote:
    > >I'm not 100% sure Tomas, but I've always heard of
    > "hinting" like the
    > >"grid-fitting" process.
    >
    > In font terminology, hinting is the process of
    > applying the
    > "hints" that the author(s) of an outline font
    > included in the data
    > for use in creating better looking bitmaps at
    > smaller sizes.
    >
    >
    > >The non-scaling factor that you're speaking about
    > here is due to the
    > >changes that each glyph suffers when it goes from a
    > high size to a low
    > >size, even when you keep it at high resolution
    > (usually making the
    > >characters wider to make them more easily
    > readable).
    >
    > Right - which is why you should NEVER attempt to do
    > text
    > layout based on changes in font size. INSTEAD, you
    > change the
    > transformation matrix of the outline data to account
    > for the scaling
    > factor and then rerasterize the outline. That
    > gives you a PERFECTLY
    > SCALED result.

    ok, I think that we're all in sync here

    > >I don't understand that. Why that will help us to
    > draw each character
    > >at the right position?
    >
    > Because you get linear scaling...

    That will give us the right metrics to place the
    characters, but if we draw using XftDrawString it will
    not use these metrics, but the default scapements.

    Tomas said:
    > I think if we do this then we will not need to
    > advance by characters to fix this (which I am pretty

    > certain would result in in a very poor drawing
    > performance).

    And that's what I don't understand. We got the right
    metrics to place each character, say 3.4 pixels of
    horizontal advance. We still have to draw using
    XftDrawCharSpec using our 3.4 pixels (rounding each
    character position to an integer value, but using
    decimal value to compute the pen position), instead of
    using XftDrawString that will use the default integer
    scapement.

    Am I missing something here?

    Cheers,

    =====
    Joaquin Cuenca Abela
    e98cuenc@yahoo.com

    __________________________________________________
    Do You Yahoo!?
    Yahoo! - Official partner of 2002 FIFA World Cup
    http://fifaworldcup.yahoo.com



    This archive was generated by hypermail 2.1.4 : Tue May 28 2002 - 03:39:13 EDT