38
47
class PortableFontInstance : public LEFontInstance
46
const SFNTDirectory *fDirectory;
48
CMAPMapper *fCMAPMapper;
50
const HMTXTable *fHMTXTable;
52
le_uint16 fNumLongHorMetrics;
54
const DirectoryEntry *findTable(LETag tag) const;
55
const void *readTable(LETag tag, le_uint32 *length) const;
56
void deleteTable(const void *table) const;
58
CMAPMapper *PortableFontInstance::findUnicodeMapper();
55
const SFNTDirectory *fDirectory;
59
TableCacheEntry *fTableCache;
60
le_int32 fTableCacheCurr;
61
le_int32 fTableCacheSize;
63
CMAPMapper *fCMAPMapper;
65
const HMTXTable *fHMTXTable;
67
le_uint16 fNumLongHorMetrics;
69
static le_int8 highBit(le_int32 value);
71
PFIErrorCode PortableFontInstance::initFontTableCache();
72
void PortableFontInstance::flushFontTableCache();
74
const DirectoryEntry *findTable(LETag tag) const;
75
const void *readTable(LETag tag, le_uint32 *length) const;
76
void deleteTable(const void *table) const;
78
CMAPMapper *PortableFontInstance::findUnicodeMapper();
61
81
PortableFontInstance(char *fileName, float pointSize, PFIErrorCode &status);
63
83
virtual ~PortableFontInstance();
65
virtual const void *getFontTable(LETag tableTag) const
69
return readTable(tableTag, &length);
85
virtual const void *getFontTable(LETag tableTag) const;
72
87
virtual le_bool canDisplay(LEUnicode32 ch) const
82
97
virtual le_int32 getLineHeight() const
84
99
// this is a cheap hack!!
85
return (le_int32) fPointSize;
100
return (le_int32) fPointSize;
88
103
virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, const LECharMapper *mapper, LEGlyphID glyphs[]) const;
92
107
virtual le_int32 getName(le_uint16 platformID, le_uint16 scriptID, le_uint16 languageID, le_uint16 nameID, LEUnicode *name) const
94
// This is only used for CDAC fonts, and we'll have to loose that support anyhow...
109
// This is only used for CDAC fonts, and we'll have to loose that support anyhow...
95
110
//return (le_int32) fFontObject->getName(platformID, scriptID, languageID, nameID, name);
103
118
virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;