• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *
3  * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
4  *
5  */
6 
7 #include "LETypes.h"
8 #include "loengine.h"
9 #include "PortableFontInstance.h"
10 #include "SimpleFontInstance.h"
11 
12 U_CDECL_BEGIN
13 
le_portableFontOpen(const char * fileName,float pointSize,LEErrorCode * status)14 le_font *le_portableFontOpen(const char *fileName,
15 					float pointSize,
16 					LEErrorCode *status)
17 {
18 	return (le_font *) new PortableFontInstance(fileName, pointSize, *status);
19 }
20 
le_simpleFontOpen(float pointSize,LEErrorCode * status)21 le_font *le_simpleFontOpen(float pointSize,
22 				  LEErrorCode *status)
23 {
24 	return (le_font *) new SimpleFontInstance(pointSize, *status);
25 }
26 
le_fontClose(le_font * font)27 void le_fontClose(le_font *font)
28 {
29 	LEFontInstance *fontInstance = (LEFontInstance *) font;
30 
31 	delete fontInstance;
32 }
33 
le_getNameString(le_font * font,le_uint16 nameID,le_uint16 platform,le_uint16 encoding,le_uint16 language)34 const 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 
le_deleteNameString(le_font * font,const char * name)41 void le_deleteNameString(le_font *font, const char *name)
42 {
43 	PortableFontInstance *pfi = (PortableFontInstance *) font;
44 
45 	pfi->deleteNameString(name);
46 }
47 
le_getFontChecksum(le_font * font)48 le_uint32 le_getFontChecksum(le_font *font)
49 {
50 	PortableFontInstance *pfi = (PortableFontInstance *) font;
51 
52 	return pfi->getFontChecksum();
53 }
54 
55 U_CDECL_END
56