freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] Outline vertices


From: David Turner
Subject: Re: [Freetype] Outline vertices
Date: Wed, 20 Nov 2002 14:11:45 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910

Hello Braden,

Braden McDaniel wrote:
I'm having some trouble understanding the nature of FreeType's outline
vertices. I get an outline for a 'K' in "Luxi Sans" (keeping it simple
at the moment--no curves). I call FT_Outline_Decompose and my moveTo and
lineTo functions are called, and I get a contour consisting of these
points:

    [0, 0]
    [64, 0]
    [64, 32]
    [64, 0]
    [64, 0]
    [64, 33]
    [64, 64]
    [64, 64]
    [64, 32]
    [64, 64]
    [0, 64]
    [0, 0]
Now, I appreciate from reading the documentation that I will need to
rescale the vertices I get from FreeType. But if I draw this contour on
a piece of paper, I don't wind up with anything resembling a 'K'. (I do
note that there are 12 points in the contour, which makes sense.)

An 'I' gives me:

    [0, 0]
    [64, 0]
    [64, 64]
    [0, 64]
    [0, 0]

A square. Okay, that could be rescaled to be a tall thin rectangle. But
then an 'i' gives me:

    [0, 0]
    [64, 0]
    [64, 64]
    [0, 64]
    [0, 0]
[0, 0]
    [64, 0]
    [64, 64]
    [0, 64]
    [0, 0]
Two contours, as expected; but it's the same square twice.

Clearly I'm missing something. But I've spent a while looking at the
documentation and I haven't been able to figure it out yet. So I'd
*really* appreciate a pointer.

Since nearly all your coordinates are multiples of 64, i suppose that
you're loading hinted outlines through FT_Load_Glyph.

However, your "i" has a size of only 1 pixel, which probably means
that you're using an extremely small character pixel size. There is
no way that any of the hinters in FreeType (auto,truetype,postscript)
can produce anything useful at such low sizes.

Have you tried loading the outlines at different scales, or simply
with no scaling/hinting with FT_LOAD_NO_SCALE ?

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]