Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

LEFontInstance.h

Go to the documentation of this file.
00001 
00002 /*
00003  * @(#)LEFontInstance.h 1.3 00/03/15
00004  *
00005  * (C) Copyright IBM Corp. 1998, 1999, 2000 - All Rights Reserved
00006  *
00007  */
00008 
00009 #ifndef __LEFONTINSTANCE_H
00010 #define __LEFONTINSTANCE_H
00011 
00012 #include "LETypes.h"
00013 
00021 class LECharMapper
00022 {
00023 public:
00031     virtual LEUnicode32 mapChar(LEUnicode32 ch) = 0;
00032 };
00033 
00044 class LEFontInstance
00045 {
00046 public:
00047 
00052     virtual ~LEFontInstance() { };
00053 
00054         //
00055     // Font file access
00056         //
00057 
00065     virtual const void *getFontTable(LETag tableTag) = 0;
00066 
00077     virtual le_bool canDisplay(LEUnicode ch) = 0;
00078 
00085     virtual le_int32 getUnitsPerEM() = 0;
00086 
00100     virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LECharMapper *mapper, LEGlyphID glyphs[]) = 0;
00101 
00113     virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, LECharMapper *mapper) = 0;
00114 
00126     virtual le_int32 getName(le_uint16 platformID, le_uint16 scriptID, le_uint16 languageID, le_uint16 nameID, LEUnicode *name) = 0;
00127 
00128         //
00129     // Metrics
00130         //
00131 
00138     virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) = 0;
00139 
00150     virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) = 0;
00151 
00158     virtual float getXPixelsPerEm() = 0;
00159 
00166     virtual float getYPixelsPerEm() = 0;
00167 
00176     virtual float xUnitsToPoints(float xUnits) = 0;
00177 
00186     virtual float yUnitsToPoints(float yUunits) = 0;
00187 
00194     virtual void unitsToPoints(LEPoint &units, LEPoint &points) = 0;
00195 
00204     virtual float xPixelsToUnits(float xPixels) = 0;
00205 
00214     virtual float yPixelsToUnits(float yPixels) = 0;
00215 
00222     virtual void pixelsToUnits(LEPoint &pixels, LEPoint &units) = 0;
00223 
00232     virtual void transformFunits(float xFunits, float yFunits, LEPoint &pixels) = 0;
00233 
00242     static float fixedToFloat(le_int32 fixed)
00243     {
00244         return (float) (fixed / 65536.0);
00245     };
00246 
00255     static le_int32 floatToFixed(float theFloat)
00256     {
00257         return (le_int32) (theFloat * 65536.0);
00258     };
00259 };
00260 
00261 #endif
00262 
00263 

Generated at Fri Dec 15 12:12:33 2000 for ICU 1.7 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000