[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] Kerning
From: |
Wallace Chigona |
Subject: |
[Freetype] Kerning |
Date: |
Wed, 26 Sep 2001 15:14:18 +0200 |
I have some problems with kerning. In the code below I am loading a
face and an ".afm" file. The test FT_HAS_KERNING(face) returns "false"
however, the kerning has a value "-128, 0".
How should I understand this?
_______________________________________________
void GLBox::initializeGL()
{
qglClearColor( white );
glClear(GL_COLOR_BUFFER_BIT);
error = FT_Init_FreeType( &library );
if ( error )
cerr << "error on library";
error = FT_New_Face( library, "/usr/lib/DPS/outline/base/Helvetica",
0, &face );
if ( error == FT_Err_Unknown_File_Format )
cerr << "can be open but not read\n";
else if ( error )
cerr << "could not be opened\n";
if (FT_Attach_File(face, "/usr/lib/DPS/AFM/Helvetica"))
cerr << "error attaching\n";
FT_Set_Pixel_Sizes(face, _size, 0);
cerr << FT_HAS_KERNING(face) << " has kerning\n";
FT_Vector akerning;
error = FT_Get_Kerning(face,
FT_Get_Char_Index( face, 'V' ),
FT_Get_Char_Index( face, 'A' ),
ft_kerning_default ,
&akerning);
cerr << akerning.x << "@" << akerning.y << "\n";
(*this).redraw();
glShadeModel( GL_FLAT );
}
- [Freetype] Kerning,
Wallace Chigona <=