freetype
[Top][All Lists]
Advanced

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

Re: [ft] The fastest way to query size of a rendered bitmap


From: Werner LEMBERG
Subject: Re: [ft] The fastest way to query size of a rendered bitmap
Date: Mon, 18 Sep 2017 08:39:19 +0200 (CEST)

> Am I right that drop-out control can result in a 1-bit bitmap
> smaller (but never bigger) than the 8-bit one?

I don't think so.  Consider a glyph like `)'.  If rendered without
dropout control, you might get

  x
  x

  x
  x

and with dropout control it might be rendered as

  x
  x
   x
  x
  x

which increases the bbox by one pixel.

> The tutorial (3. Coordinates, scaling and grid-fitting) mentions the
> drop-outs and describes the steps to compute an approximate size of
> a bitmap by grid-fitting the bounding box of a glyph.  It seems like
> this is the best solution for my case.

If you apply ceiling for the maximum values and flooring for the
minimum values, this should work, yes.


    Werner



reply via email to

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