Quantcast
Channel: Typophile - Comments
Viewing all articles
Browse latest Browse all 20084

It's a question of functional

$
0
0

In reply to Text to image generation:

It's a question of functional layering. Here is an infographic, hope this makes it a bit more clear.

FreeType is best at drawing glyphs (both Unicode encoded and un-encoded), but you have to tell it what glyphs to draw and where. It only uses the outline part of an OpenType font.
HarfBuzz can look up the correct glyph sequence to be displayed from a font, given a string of characters to draw and a set of Opentype features to apply.
Pango integrates the two: you tell it what text to draw with what features applied.

It totally depends on how far you want to go. Typically, you would use only FreeType if all you want to show is a simple list of all glyphs in a font (I used it to write my own quick-and-dirty font inspector).

If you want to see Opentype features in action, you could read the data yourself out of the font and "apply" it (i.e., performing the right lookups for the character(s) you want to display and the features it should show), or use HarfBuzz, which -- as I understand -- does the looking up and translating to other glyphs for you.

If you want a fully featured text drawing engine, you need to take 'everything' into account -- Opentype features, kerning, and even font switching to do stuff like display an italic word in a regular string. That's what Pango can do for you.


Viewing all articles
Browse latest Browse all 20084

Trending Articles