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: Werner LEMBERG
Subject: Re: [ft] Determining pixel dimensions for bitmap
Date: Mon, 03 Nov 2014 08:24:26 +0100 (CET)

>>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.

Well, yes.  It's the job of the rendering algorithm to find out the
coverage of a pixel at the outline border.  So it indeed might happen
that a coordinate of an extremum slightly exceeds an integer value,
and the associated pixel coverage is still zero.

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

Right now, there isn't.  However, the computation of the pixel
coverage for a given resolution only at the extrema should be
possible; this would be a variant of `FT_Outline_Get_BBox',
e.g. `FT_Outline_Get_Smooth_BBox'.

Alexei?


    Werner



reply via email to

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