]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/letest/cfonts.cpp
3 * (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved
9 #include "PortableFontInstance.h"
10 #include "SimpleFontInstance.h"
14 le_font
*le_portableFontOpen(const char *fileName
,
18 return (le_font
*) new PortableFontInstance(fileName
, pointSize
, *status
);
21 le_font
*le_simpleFontOpen(float pointSize
,
24 return (le_font
*) new SimpleFontInstance(pointSize
, *status
);
27 void le_fontClose(le_font
*font
)
29 LEFontInstance
*fontInstance
= (LEFontInstance
*) font
;
34 const char *le_getNameString(le_font
*font
, le_uint16 nameID
, le_uint16 platform
, le_uint16 encoding
, le_uint16 language
)
36 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
38 return pfi
->getNameString(nameID
, platform
, encoding
, language
);
41 const LEUnicode16
*le_getUnicodeNameString(le_font
*font
, le_uint16 nameID
, le_uint16 platform
, le_uint16 encoding
, le_uint16 language
)
43 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
45 return pfi
->getUnicodeNameString(nameID
, platform
, encoding
, language
);
48 void le_deleteNameString(le_font
*font
, const char *name
)
50 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
52 pfi
->deleteNameString(name
);
55 void le_deleteUnicodeNameString(le_font
*font
, const LEUnicode16
*name
)
57 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
59 pfi
->deleteNameString(name
);
62 le_uint32
le_getFontChecksum(le_font
*font
)
64 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
66 return pfi
->getFontChecksum();