[Top][All Lists]

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

Calculating the maximum size of a rendered bitmap

From: Kevin Dance
Subject: Calculating the maximum size of a rendered bitmap
Date: Tue, 15 Aug 2000 01:07:28 +0100

I am using the function calls "FT_Load_Glyph(Face,Index,FT_LOAD_DEFAULT)" and "FT_Render_Glyph(Face->glyph, ft_render_mode_normal)" to render a given glyph into a bitmap of type "FT_Bitmap". However, what I need to do is to know the maximum possible size that the bitmap can be before hand. Can this be achieved without simply looping throught all of the glyphs and rendering them during the initialisation phase of my program, since this will obviously take time. Is there a quick was to do this calculation?
Alternatively, if I have to loop through all of the glyphs then I can determine the total number of glyphs by using "Face->num_glyphs".  However, I have tried to render all glyphs from 0 to "Face->num_glyphs - 1" but my program crashes. How can I tell whether I can render a given glyph index and has anyone got any code to do this calculation successfully?
Thanks in advance for you help.
Kevin Dance

reply via email to

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