Re: Need help understanding how things fit together

On 15-01-20 10:18 AM, Anthony Kraft wrote:
I have been researching text rendering and have read what I can find about
Pango, HarfBuzz, and FreeType. However, I cannot seem to put together exactly
how these pieces fit together since all explanations are quite high level. I
think what would help me the most is to understand what the inputs/outputs are
of each layer and how they feed into one another (or possibly where you can
skip a layer). 

I suppose you've read this already:

In short:

  - FreeType, takes a font file and glyph indices, font size, hinting
settings, etc, and outputs bitmap images.  This is called rasterization.
Alternatively, you can just get the glyph vector outline out of FreeType and
do your own rasterization,

  - HarfBuzz, takes Unicode text and font file, font size, etc, and outputs
list glyph indices and positions to show those glyphs.  This is called
shaping.  No rasterization happens whatsoever,

  - Pango, takes maked-up Unicode text and lays it out in a box, using
HarfBuzz and FreeType among a stack of other libraries or alternatives.  This
is called paragraph layout.  It handles things like line breaking, text
selection, etc,


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