freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] weird glyph width/heights


From: HaB JacKaL
Subject: Re: [Freetype] weird glyph width/heights
Date: Thu, 02 May 2002 14:58:34 -0400



From: Peter Montgomery <address@hidden>
Reply-To: address@hidden
To: address@hidden
Subject: Re: [Freetype] weird glyph width/heights
Date: Thu, 02 May 2002 10:21:53 -0700

Brian,

    I'm just jumping in on this thread.

> > As an aside...I keep seeing references in the API docs and tutorials
to
> > "26.6 format pixels".  Uhh...whazzat?
>
> It is a way to use allow an "integer" to have a fractional part.
> It gives the effect of a floating point number but on some
> systems is much faster.
>
> For 26.6: of the 32 bits, bits 0-5 are the fraction and 6-31 are the
> integer.
>
> > Can they be converted to screen pixels?
>
> Just shift right 6 bits to get the integer.
>
> Same basic idea for 16.16 but of course there are 16 bits of
> fraction.

Do you (or anyone else on the list) know if FreeType's 26.6 format pixel
use the same orientation as typical screen graphics (+X = right, +Y =
down) or normal Cartesian coordinates (+X = right, Y+ = up)?

    Thanks,
    PeterM


My understanding, from reading the docs is that bitmap_top and bitmap_left give the height and width using cartesian coords, from the lower left corner of the glyph.

I think deciding how it's gonna fit on the screen is up to whatever program you are using to put in on the screen with. Since I'm using openGL, I just need the width and height of the bitmap, and then I call glBitmap() accordingly.

So..I guess that Freetype's pixel values are relative only to the glyph itself. Mapping to screen coords is up to you.

Don't quote me on any of this.  I am a rank newb, after all.
[:


-HaB



_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com




reply via email to

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