freetype
[Top][All Lists]
Advanced

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

What determines cursor advance for letters?


From: Gaiser, Jason
Subject: What determines cursor advance for letters?
Date: Thu, 29 Jun 2000 15:13:08 -0700

Hi All,

Stupid question #2:
I've been using:
{
        left  = FLOOR( glyph->metrics.horiBearingX );

        right = CEIL( glyph->metrics.horiBearingX + glyph->metrics.width );

        width = TRUNC( right - left );

        cursor += width + 2;           
}

to compute my cursor advance.  It gives good results with the fonts I've
tested. I wondered if I could try the same method that I'm using to compute
space width.  I figured I should be able to use:

            cursor += TRUNC(face->glyph->metrics.horiAdvance);

but this is totally wrong(cursor doesn't advance enough).  What is the
correct method?  

Thanks!

{
   Jason Gaiser                                 phone:  (858) 824-3078
   Wind River Doctor Design Services    fax: (858) 824-3178
   address@hidden               http://www.doctordesign.com
}





reply via email to

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