]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/perf/leperf/cfonts.cpp
3 * © 2016 and later: Unicode, Inc. and others.
4 * License & terms of use: http://www.unicode.org/copyright.html#License
6 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
12 #include "PortableFontInstance.h"
13 #include "SimpleFontInstance.h"
17 le_font
*le_portableFontOpen(const char *fileName
,
21 return (le_font
*) new PortableFontInstance(fileName
, pointSize
, *status
);
24 le_font
*le_simpleFontOpen(float pointSize
,
27 return (le_font
*) new SimpleFontInstance(pointSize
, *status
);
30 void le_fontClose(le_font
*font
)
32 LEFontInstance
*fontInstance
= (LEFontInstance
*) font
;
37 const char *le_getNameString(le_font
*font
, le_uint16 nameID
, le_uint16 platform
, le_uint16 encoding
, le_uint16 language
)
39 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
41 return pfi
->getNameString(nameID
, platform
, encoding
, language
);
44 const LEUnicode16
*le_getUnicodeNameString(le_font
*font
, le_uint16 nameID
, le_uint16 platform
, le_uint16 encoding
, le_uint16 language
)
46 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
48 return pfi
->getUnicodeNameString(nameID
, platform
, encoding
, language
);
51 void le_deleteNameString(le_font
*font
, const char *name
)
53 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
55 pfi
->deleteNameString(name
);
58 void le_deleteUnicodeNameString(le_font
*font
, const LEUnicode16
*name
)
60 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
62 pfi
->deleteNameString(name
);
65 le_uint32
le_getFontChecksum(le_font
*font
)
67 PortableFontInstance
*pfi
= (PortableFontInstance
*) font
;
69 return pfi
->getFontChecksum();