freetype
[Top][All Lists]
Advanced

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

Re: [ft] Determining pixel dimensions for bitmap


From: Marco Wertz
Subject: Re: [ft] Determining pixel dimensions for bitmap
Date: Mon, 3 Nov 2014 01:08:44 +0100

>it seems most of my calculations for freetype are based on ceil() so yes... if 
>any fraction round up...

...but this can lead to empty rows/columns.

>do you keep the original freetype bitmap? Or are you moving it to an internal 
>format?

I'm keeping it. An 8-bit grayscale bitmap is exactly what I need.

>I use FT_Render_Glyph( face->glyph, FT_RENDER_MODE_NORMAL ); which has a 
>bitmap in the face->glyph structure that gets filled in and
>apparently sized appropriate for the glyph... but that's not an outline.  I 
>process the bitmap and skip any areas that are blank outside
>the character... 

Well, but that's exactly what I'd like to avoid as the backend I'm trying to 
fit the FreeType2 renderer into strictly
distinguishes between size determination and drawing stage. With the approach 
above it could happen that the size
determination stage's results are invalidated by the drawing stage because of 
empty rows/columns that would be removed
during the drawing stage then. All parameters based on the bitmap dimensions 
obtained during the size determination stage
would then suddenly be invalid :/

Is there really no way to find out the exact pixel size of an outline *without* 
actually drawing it?

Marco

 
 



reply via email to

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