]>
Commit | Line | Data |
---|---|---|
46f4442e A |
1 | /* |
2 | * | |
3 | * (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved | |
4 | * | |
5 | */ | |
6 | ||
7 | #include "LETypes.h" | |
8 | #include "loengine.h" | |
9 | #include "PortableFontInstance.h" | |
10 | #include "SimpleFontInstance.h" | |
11 | ||
12 | U_CDECL_BEGIN | |
13 | ||
14 | le_font *le_portableFontOpen(const char *fileName, | |
15 | float pointSize, | |
16 | LEErrorCode *status) | |
17 | { | |
18 | return (le_font *) new PortableFontInstance(fileName, pointSize, *status); | |
19 | } | |
20 | ||
21 | le_font *le_simpleFontOpen(float pointSize, | |
22 | LEErrorCode *status) | |
23 | { | |
24 | return (le_font *) new SimpleFontInstance(pointSize, *status); | |
25 | } | |
26 | ||
27 | void le_fontClose(le_font *font) | |
28 | { | |
29 | LEFontInstance *fontInstance = (LEFontInstance *) font; | |
30 | ||
31 | delete fontInstance; | |
32 | } | |
33 | ||
34 | const char *le_getNameString(le_font *font, le_uint16 nameID, le_uint16 platform, le_uint16 encoding, le_uint16 language) | |
35 | { | |
36 | PortableFontInstance *pfi = (PortableFontInstance *) font; | |
37 | ||
38 | return pfi->getNameString(nameID, platform, encoding, language); | |
39 | } | |
40 | ||
41 | const LEUnicode16 *le_getUnicodeNameString(le_font *font, le_uint16 nameID, le_uint16 platform, le_uint16 encoding, le_uint16 language) | |
42 | { | |
43 | PortableFontInstance *pfi = (PortableFontInstance *) font; | |
44 | ||
45 | return pfi->getUnicodeNameString(nameID, platform, encoding, language); | |
46 | } | |
47 | ||
48 | void le_deleteNameString(le_font *font, const char *name) | |
49 | { | |
50 | PortableFontInstance *pfi = (PortableFontInstance *) font; | |
51 | ||
52 | pfi->deleteNameString(name); | |
53 | } | |
54 | ||
55 | void le_deleteUnicodeNameString(le_font *font, const LEUnicode16 *name) | |
56 | { | |
57 | PortableFontInstance *pfi = (PortableFontInstance *) font; | |
58 | ||
59 | pfi->deleteNameString(name); | |
60 | } | |
61 | ||
62 | le_uint32 le_getFontChecksum(le_font *font) | |
63 | { | |
64 | PortableFontInstance *pfi = (PortableFontInstance *) font; | |
65 | ||
66 | return pfi->getFontChecksum(); | |
67 | } | |
68 | ||
69 | U_CDECL_END |