]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/test/letest/cfonts.cpp
ICU-400.37.tar.gz
[apple/icu.git] / icuSources / test / letest / cfonts.cpp
... / ...
CommitLineData
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
12U_CDECL_BEGIN
13
14le_font *le_portableFontOpen(const char *fileName,
15 float pointSize,
16 LEErrorCode *status)
17{
18 return (le_font *) new PortableFontInstance(fileName, pointSize, *status);
19}
20
21le_font *le_simpleFontOpen(float pointSize,
22 LEErrorCode *status)
23{
24 return (le_font *) new SimpleFontInstance(pointSize, *status);
25}
26
27void le_fontClose(le_font *font)
28{
29 LEFontInstance *fontInstance = (LEFontInstance *) font;
30
31 delete fontInstance;
32}
33
34const 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
41const 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
48void le_deleteNameString(le_font *font, const char *name)
49{
50 PortableFontInstance *pfi = (PortableFontInstance *) font;
51
52 pfi->deleteNameString(name);
53}
54
55void le_deleteUnicodeNameString(le_font *font, const LEUnicode16 *name)
56{
57 PortableFontInstance *pfi = (PortableFontInstance *) font;
58
59 pfi->deleteNameString(name);
60}
61
62le_uint32 le_getFontChecksum(le_font *font)
63{
64 PortableFontInstance *pfi = (PortableFontInstance *) font;
65
66 return pfi->getFontChecksum();
67}
68
69U_CDECL_END