Update contrib.
2 *******************************************************************************
4 * Copyright (C) 1999-2003, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
8 * file name: PortableFontInstance.h
10 * created on: 11/12/1999
11 * created by: Eric R. Mader
14 #ifndef __PORTABLEFONTINSTANCE_H
15 #define __PORTABLEFONTINSTANCE_H
19 #include "layout/LETypes.h"
20 #include "layout/LEFontInstance.h"
22 #include "FontTableCache.h"
27 class PortableFontInstance : public LEFontInstance, protected FontTableCache
38 const SFNTDirectory *fDirectory;
45 CMAPMapper *fCMAPMapper;
47 const HMTXTable *fHMTXTable;
49 le_uint16 fNumLongHorMetrics;
51 static le_int8 highBit(le_int32 value);
53 const DirectoryEntry *findTable(LETag tag) const;
54 const void *readTable(LETag tag, le_uint32 *length) const;
55 void deleteTable(const void *table) const;
58 CMAPMapper *findUnicodeMapper();
61 const void *readFontTable(LETag tableTag) const;
64 PortableFontInstance(char *fileName, float pointSize, LEErrorCode &status);
66 virtual ~PortableFontInstance();
68 virtual const void *getFontTable(LETag tableTag) const;
70 virtual le_int32 getUnitsPerEM() const
75 virtual le_int32 getAscent() const
80 virtual le_int32 getDescent() const
85 virtual le_int32 getLeading() const
90 virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch) const
92 return fCMAPMapper->unicodeToGlyph(ch);
95 virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;
97 virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const;
99 float getXPixelsPerEm() const
104 float getYPixelsPerEm() const
109 float getScaleFactorX() const
114 float getScaleFactorY() const