A glyph class. More...
#include <Glyph.hh>
Public Member Functions | |
virtual unsigned | Width () const =0 |
Width in un-scaled Freetype font unit. | |
virtual unsigned | Height () const =0 |
Height in un-scaled Freetype font unit. | |
virtual unsigned | AdvanceX () const =0 |
Horizonal advance in un-scaled Freetype font unit. | |
virtual unsigned | AdvanceY () const =0 |
Vertical advance in un-scaled Freetype font unit. | |
virtual bool | Decompose (Outline *outline) const =0 |
Decompose the glyph outline. | |
virtual bool | IsOutline () const =0 |
Return true if the glyph is outline glyph, otherwise false. | |
Protected Member Functions | |
~Glyph () | |
protected destructor to ensure no polymorphic deletion. |
The Glyph class represents a glyph in an PDF document. A glyph is an image representation of a character in a font face. This class provides access to many information about a glyph, e.g. its metrics and outline rendering. The unit of the metrics provided by this class is always in font unit. The actual size of the font unit is defined by Font::UnitsPerEM().
virtual bool pdf::Glyph::Decompose | ( | Outline * | outline | ) | const [pure virtual] |
This function walks through the glyph outline and decompose it into individual segment and Bezier arcs. The caller will implement the Outline interface and the corresponding callback function in the Outline interface will be called for each line segment and Bezier arcs in the glyph.
outline | A callback interface to each segment and arcs. |
true
if walk through successfully, otherwise false
. It fails when the glyph is not an outline glyph.