• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  ******************************************************************************
3  * Copyright (C) 1998-2003, International Business Machines Corporation and   *
4  * others. All Rights Reserved.                                               *
5  ******************************************************************************
6  */
7 
8 #include <windows.h>
9 
10 #include "layout/LEFontInstance.h"
11 
12 #include "GDIFontInstance.h"
13 
14 #include "GUISupport.h"
15 #include "FontMap.h"
16 #include "GDIFontMap.h"
17 
GDIFontMap(GDISurface * surface,const char * fileName,le_int16 pointSize,GUISupport * guiSupport,LEErrorCode & status)18 GDIFontMap::GDIFontMap(GDISurface *surface, const char *fileName, le_int16 pointSize, GUISupport *guiSupport, LEErrorCode &status)
19     : FontMap(fileName, pointSize, guiSupport, status), fSurface(surface)
20 {
21     // nothing to do?
22 }
23 
~GDIFontMap()24 GDIFontMap::~GDIFontMap()
25 {
26     // anything?
27 }
28 
openFont(const char * fontName,le_int16 pointSize,LEErrorCode & status)29 const LEFontInstance *GDIFontMap::openFont(const char *fontName, le_int16 pointSize, LEErrorCode &status)
30 {
31 	LEFontInstance *result = new GDIFontInstance(fSurface, fontName, pointSize, status);
32 
33 	if (LE_FAILURE(status)) {
34 		delete result;
35 		result = NULL;
36 	}
37 
38     return result;
39 }
40