[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] weird glyph width/heights
From: |
David Turner |
Subject: |
Re: [Freetype] weird glyph width/heights |
Date: |
Fri, 03 May 2002 09:19:23 +0200 |
Hi,
Try to replace:
HaB JacKaL a écrit :
>
> w = (int )&slot->bitmap.width;
> w = w >> 6;
> h = (int )&slot->bitmap.rows;
> h = h >> 6;
> printf("bitmap w = %d, bitmap h = %d\n", w, h);
with
w = (int) slot->bitmap.width
h = (int) slot->bitmap.height;
printf( "bitmap w = %d, bitmap h = %d\n", w, h );
What you're doing wrong is:
- you're taking the _address_ if memory of the bitmap
with and height, not their values
- bitmap.width and bitmap.height are always expressed
in integer pixels. Only metrics (found in "slot->metrics")
are expressed in 26.6 coordinates, unless you specified
the FT_LOAD_NO_SCALE flag during glyhp loading
Hope this helps,
- David Turner
- The FreeType Project (www.freetype.org)