freetype
[Top][All Lists]
Advanced

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

Re: FreeType 2 Tutorial part 1.. Can't wait for part 2


From: Harley Blumenfeld
Subject: Re: FreeType 2 Tutorial part 1.. Can't wait for part 2
Date: Fri, 30 Jun 2000 14:51:01 GMT

I saw that in the docs section and found it very useful. Especially
since I am in the process of converting my app from freetype 1.3.1 to
freetype2.

I can't wait for part 2 which discusses kerning. Right now I am using
a HUGE HACK for kerning.  Here is a snippet from my code :

FT_Vector kerningVec;
FT_Get_Kerning( m_face, codes[ i ], codes[ i+1 ],&kerningVec );
if (m_face->size->metrics.x_scale != 0x10000)
{
kerningVec.x = FT_MulFix( kerningVec.x, m_face->size>metrics.x_scale );
kerningVec.x = (kerningVec.x+32) & -64;
}
else
{
kerningVec.x = kerningVec.x >> 6;
}

It seems that face->size->metrics.x_scale is always == 0x10000, so
FT_MultFix doesn't do anything since it's operation is (a*b)/0x10000.
This causes KerningVec.x to be too big. Is feels like a hack is this approach wrong?

Also - I am caching FT_Bitmaps and FT_BitmapGlyphs. How should I destroy
these variables when I am done? The reason I am caching them is because
my application uses the pixmaps as GL_ALPHA texture maps.

Thanks,
Harley


From: David Turner <address@hidden>
To: address@hidden
Subject: FreeType 2 Tutorial part 1
Date: Fri, 30 Jun 2000 10:15:10 +0200

Hello,

  I've started rewritting the FreeType 2 tutorial. For those interested,
  the first part is now accessible at:

     http://www.freetype.org/docs/freetype2/step1.html

  It presents some features of the final high-level API that should make
  it in the next beta (release candidate !!)..

  Any comments are welcomed..

- David

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com




reply via email to

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