]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/letest/cfonts.cpp
3 * (C) Copyright IBM Corp. 1998-2014 - All Rights Reserved
7 #ifndef USING_ICULEHB /* C API not available under HB */
9 #include "layout/LETypes.h"
11 #include "PortableFontInstance.h"
12 #include "SimpleFontInstance.h"
16 le_font
*le_portableFontOpen(const char *fileName
,
20 return (le_font
*) new PortableFontInstance(fileName
, pointSize
, *status
);
23 le_font
*le_simpleFontOpen(float pointSize
,
26 return (le_font
*) new SimpleFontInstance(pointSize
, *status
);
29 void le_fontClose(le_font
*font
)
31 LEFontInstance
*fontInstance
= (LEFontInstance
*) font
;
36 const char *le_getNameString(le_font
*font
, le_uint16 nameID
, le_uint16 platform
, le_uint16 encoding
, le_uint16 language
)
38 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
40 return pfi
->getNameString(nameID
, platform
, encoding
, language
);
43 const LEUnicode16
*le_getUnicodeNameString(le_font
*font
, le_uint16 nameID
, le_uint16 platform
, le_uint16 encoding
, le_uint16 language
)
45 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
47 return pfi
->getUnicodeNameString(nameID
, platform
, encoding
, language
);
50 void le_deleteNameString(le_font
*font
, const char *name
)
52 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
54 pfi
->deleteNameString(name
);
57 void le_deleteUnicodeNameString(le_font
*font
, const LEUnicode16
*name
)
59 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
61 pfi
->deleteNameString(name
);
64 le_uint32
le_getFontChecksum(le_font
*font
)
66 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
68 return pfi
->getFontChecksum();