]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | ****************************************************************************** | |
f3c0d7a5 A |
3 | * © 2016 and later: Unicode, Inc. and others. * |
4 | * License & terms of use: http://www.unicode.org/copyright.html#License * | |
5 | ****************************************************************************** | |
6 | ****************************************************************************** | |
b75a7d8f A |
7 | * Copyright (C) 1998-2003, International Business Machines Corporation and * |
8 | * others. All Rights Reserved. * | |
9 | ****************************************************************************** | |
10 | */ | |
11 | ||
12 | #include <windows.h> | |
13 | ||
14 | #include "layout/LEFontInstance.h" | |
15 | ||
16 | #include "GDIFontInstance.h" | |
17 | ||
18 | #include "GUISupport.h" | |
19 | #include "FontMap.h" | |
20 | #include "GDIFontMap.h" | |
21 | ||
22 | GDIFontMap::GDIFontMap(GDISurface *surface, const char *fileName, le_int16 pointSize, GUISupport *guiSupport, LEErrorCode &status) | |
23 | : FontMap(fileName, pointSize, guiSupport, status), fSurface(surface) | |
24 | { | |
25 | // nothing to do? | |
26 | } | |
27 | ||
28 | GDIFontMap::~GDIFontMap() | |
29 | { | |
30 | // anything? | |
31 | } | |
32 | ||
33 | const LEFontInstance *GDIFontMap::openFont(const char *fontName, le_int16 pointSize, LEErrorCode &status) | |
34 | { | |
374ca955 A |
35 | LEFontInstance *result = new GDIFontInstance(fSurface, fontName, pointSize, status); |
36 | ||
37 | if (LE_FAILURE(status)) { | |
38 | delete result; | |
39 | result = NULL; | |
40 | } | |
41 | ||
42 | return result; | |
b75a7d8f | 43 | } |