freetype
[Top][All Lists]
Advanced

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

Re: [ft] default LCD rendering to bounding box


From: Werner LEMBERG
Subject: Re: [ft] default LCD rendering to bounding box
Date: Wed, 07 Nov 2018 07:39:18 +0100 (CET)

> The bitmap dimensions.  For a 'g' glyph opentype outline for
> instance, if I load it and render it using the LCD(RGB) related
> options, the resulting bitmap dimensions are the bounding box of the
> glyph.  Is this true for any glyph outline rendering mode
> (monochrome, grayscale..)?

I assume that you are talking about

  FT_GlyphSlot->bitmap->{rows,width,pitch}

and that you are interested in the *smallest* possible bounding box.

The answer is yes, since FreeType needs to (re)allocate the
corresponding memory.  However, this assumes some `good conduct' of
the outline – FreeType computes the bbox before rendering; if the
outline contains extremely thin spikes that cause drop-outs in B/W
mode or not enough coverage in other rendering modes, the bbox won't
be minimal (normally, it's the job of font hinting to avoid that).  In
most cases this is rather unlikely.


    Werner

reply via email to

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