freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Can I get FreeType to generate a bitmap (not including th


From: Henry Maddocks
Subject: Re: [Freetype] Can I get FreeType to generate a bitmap (not including the space around it) of a specified size?
Date: Mon, 13 Aug 2001 14:00:00 +1200

Unless I miss understand you, you are creating one texture per glyph/character. This is NOT a good idea. This means that you will have to do a texture bind for every character which is one of the slowest operations you can do. It is far better to draw a whole font onto one large texture then use the texture coordinates to draw the glyph. This way will also make it easier to use ^2 texture sizes. Have a look at my lib to see how it can be done.

http://homepages.paradise.net.nz/henryj/code/index.html

Bear in mind though that this is beta and the texture font stuff will be vastly improved in the near future.

Henry


On Sunday, August 12, 2001, at 04:59  AM, Niklas Hoglund wrote:

I'm rendering a font I load using freetype with OpenGL, as textures on
quads.  The problem I have is that OpenGL wants all textures to have
width and height both a power of two.  Is there a way to tell FreeType
to render a (scalable) font at an exact power of two size?  I tried
using FT_Set_Pixel_Sizes(face, 256, 256), but that makes the entire
character a power of two, not just the bitmap. (Of course, I could use
this and copy the bitmap into the corner of a larger bitmap, but this
is wasteful of graphics memory.)

Thanks in advance for any help.

--
                                                Niklas

_______________________________________________
Freetype mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/freetype


"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989


Try not. Do or do not. There is no try.
Yoda,Jedi Master



reply via email to

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