1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
5 * (C) Copyright IBM Corp. 1998-2014 - All Rights Reserved
9 #ifndef USING_ICULEHB /* C API not available under HB */
11 #include "layout/LETypes.h"
13 #include "PortableFontInstance.h"
14 #include "SimpleFontInstance.h"
18 le_font *le_portableFontOpen(const char *fileName,
22 return (le_font *) new PortableFontInstance(fileName, pointSize, *status);
25 le_font *le_simpleFontOpen(float pointSize,
28 return (le_font *) new SimpleFontInstance(pointSize, *status);
31 void le_fontClose(le_font *font)
33 LEFontInstance *fontInstance = (LEFontInstance *) font;
38 const char *le_getNameString(le_font *font, le_uint16 nameID, le_uint16 platform, le_uint16 encoding, le_uint16 language)
40 PortableFontInstance *pfi = (PortableFontInstance *) font;
42 return pfi->getNameString(nameID, platform, encoding, language);
45 const LEUnicode16 *le_getUnicodeNameString(le_font *font, le_uint16 nameID, le_uint16 platform, le_uint16 encoding, le_uint16 language)
47 PortableFontInstance *pfi = (PortableFontInstance *) font;
49 return pfi->getUnicodeNameString(nameID, platform, encoding, language);
52 void le_deleteNameString(le_font *font, const char *name)
54 PortableFontInstance *pfi = (PortableFontInstance *) font;
56 pfi->deleteNameString(name);
59 void le_deleteUnicodeNameString(le_font *font, const LEUnicode16 *name)
61 PortableFontInstance *pfi = (PortableFontInstance *) font;
63 pfi->deleteNameString(name);
66 le_uint32 le_getFontChecksum(le_font *font)
68 PortableFontInstance *pfi = (PortableFontInstance *) font;
70 return pfi->getFontChecksum();