Logo Search packages:      
Sourcecode: icu version File versions  Download package

LEFontInstance Class Reference

#include <LEFontInstance.h>

Inheritance diagram for LEFontInstance:

UObject UMemory

List of all members.

Detailed Description

This is a virtual base class that serves as the interface between a LayoutEngine and the platform font environment. It allows a LayoutEngine to access font tables, do character to glyph mapping, and obtain metrics information without knowing any platform specific details. There are also a few utility methods for converting between points, pixels and funits. (font design units)

An instance of an LEFontInstance represents a font at a particular point size. Each instance can represent either a single physical font, or a composite font. A composite font is a collection of physical fonts, each of which contains a subset of the characters contained in the composite font.

Note: with the exception of getSubFont, the methods in this class only make sense for a physical font. If you have an LEFontInstance which represents a composite font you should only call the methods below which have an LEGlyphID, an LEUnicode or an LEUnicode32 as one of the arguments because these can be used to select a particular subfont.

Subclasses which implement composite fonts should supply an implementation of these methods with some default behavior such as returning constant values, or using the values from the first subfont.

ICU 3.0

Definition at line 81 of file LEFontInstance.h.

Public Member Functions

virtual le_bool canDisplay (LEUnicode32 ch) const
virtual le_int32 getAscent () const =0
virtual le_int32 getDescent () const =0
virtual UClassID getDynamicClassID () const
virtual const void * getFontTable (LETag tableTag) const =0
virtual void getGlyphAdvance (LEGlyphID glyph, LEPoint &advance) const =0
virtual le_bool getGlyphPoint (LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const =0
virtual le_int32 getLeading () const =0
virtual le_int32 getLineHeight () const
virtual float getScaleFactorX () const =0
virtual float getScaleFactorY () const =0
virtual const LEFontInstancegetSubFont (const LEUnicode chars[], le_int32 *offset, le_int32 limit, le_int32 script, LEErrorCode &success) const
virtual le_int32 getUnitsPerEM () const =0
virtual float getXPixelsPerEm () const =0
virtual float getYPixelsPerEm () const =0
virtual void mapCharsToGlyphs (const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, const LECharMapper *mapper, le_bool filterZeroWidth, LEGlyphStorage &glyphStorage) const
virtual LEGlyphID mapCharToGlyph (LEUnicode32 ch) const =0
virtual LEGlyphID mapCharToGlyph (LEUnicode32 ch, const LECharMapper *mapper) const
virtual LEGlyphID mapCharToGlyph (LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const
virtual void pixelsToUnits (LEPoint &pixels, LEPoint &units) const
virtual void transformFunits (float xFunits, float yFunits, LEPoint &pixels) const
virtual void unitsToPoints (LEPoint &units, LEPoint &points) const
virtual float xPixelsToUnits (float xPixels) const
virtual float xUnitsToPoints (float xUnits) const
virtual float yPixelsToUnits (float yPixels) const
virtual float yUnitsToPoints (float yUnits) const
virtual ~LEFontInstance ()

Static Public Member Functions

static float fixedToFloat (le_int32 fixed)
static le_int32 floatToFixed (float theFloat)
static UClassID getStaticClassID ()
static void U_EXPORT2 operator delete (void *, void *) U_NO_THROW
static void U_EXPORT2 operator delete (void *p) U_NO_THROW
static void U_EXPORT2 operator delete[] (void *p) U_NO_THROW
static void *U_EXPORT2 operator new (size_t, void *ptr) U_NO_THROW
static void *U_EXPORT2 operator new (size_t size) U_NO_THROW
static void *U_EXPORT2 operator new[] (size_t size) U_NO_THROW

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index