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