]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | /* | |
3 | ******************************************************************************* | |
4 | * | |
5 | * Copyright (C) 1999-2006, International Business Machines | |
6 | * Corporation and others. All Rights Reserved. | |
7 | * | |
8 | ******************************************************************************* | |
9 | * file name: SimpleFontInstance.h | |
10 | * | |
11 | * created on: 03/30/2006 | |
12 | * created by: Eric R. Mader | |
13 | */ | |
14 | ||
15 | #ifndef __SIMPLEFONTINSTANCE_H | |
16 | #define __SIMPLEFONTINSTANCE_H | |
17 | ||
18 | #include <stdio.h> | |
19 | ||
20 | #include "layout/LETypes.h" | |
21 | #include "layout/LEFontInstance.h" | |
22 | ||
23 | class SimpleFontInstance : public LEFontInstance | |
24 | { | |
25 | private: | |
26 | float fPointSize; | |
27 | le_int32 fAscent; | |
28 | le_int32 fDescent; | |
29 | ||
30 | protected: | |
31 | const void *readFontTable(LETag tableTag) const; | |
32 | ||
33 | public: | |
34 | SimpleFontInstance(float pointSize, LEErrorCode &status); | |
35 | ||
36 | virtual ~SimpleFontInstance(); | |
37 | ||
38 | virtual const void *getFontTable(LETag tableTag) const; | |
39 | ||
40 | virtual le_int32 getUnitsPerEM() const; | |
41 | ||
42 | virtual le_int32 getAscent() const; | |
43 | ||
44 | virtual le_int32 getDescent() const; | |
45 | ||
46 | virtual le_int32 getLeading() const; | |
47 | ||
48 | // We really want to inherit this method from the superclass, but some compilers | |
49 | // issue a warning if we don't implement it... | |
50 | virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const; | |
51 | ||
52 | // We really want to inherit this method from the superclass, but some compilers | |
53 | // issue a warning if we don't implement it... | |
54 | virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const; | |
55 | ||
56 | virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch) const; | |
57 | ||
58 | virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const; | |
59 | ||
60 | virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const; | |
61 | ||
62 | float getXPixelsPerEm() const; | |
63 | ||
64 | float getYPixelsPerEm() const; | |
65 | ||
66 | float getScaleFactorX() const; | |
67 | ||
68 | float getScaleFactorY() const; | |
69 | ||
70 | }; | |
71 | ||
72 | #endif |