]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | ****************************************************************************** | |
46f4442e | 3 | * Copyright (C) 1998-2006, International Business Machines Corporation and * |
b75a7d8f A |
4 | * others. All Rights Reserved. * |
5 | ****************************************************************************** | |
6 | */ | |
7 | ||
8 | #include <stdio.h> | |
9 | ||
46f4442e A |
10 | #include <ft2build.h> |
11 | #include FT_FREETYPE_H | |
b75a7d8f A |
12 | |
13 | #include "layout/LEFontInstance.h" | |
14 | #include "GnomeFontInstance.h" | |
15 | ||
16 | #include "GUISupport.h" | |
17 | #include "FontMap.h" | |
18 | #include "GnomeFontMap.h" | |
19 | ||
46f4442e | 20 | GnomeFontMap::GnomeFontMap(FT_Library engine, const char *fileName, le_int16 pointSize, GUISupport *guiSupport, LEErrorCode &status) |
b75a7d8f A |
21 | : FontMap(fileName, pointSize, guiSupport, status), fEngine(engine) |
22 | { | |
23 | // nothing to do? | |
24 | } | |
25 | ||
26 | GnomeFontMap::~GnomeFontMap() | |
27 | { | |
28 | // anything? | |
29 | } | |
30 | ||
31 | const LEFontInstance *GnomeFontMap::openFont(const char *fontName, le_int16 pointSize, LEErrorCode &status) | |
32 | { | |
374ca955 A |
33 | LEFontInstance *result = new GnomeFontInstance(fEngine, fontName, pointSize, status); |
34 | ||
35 | if (LE_FAILURE(status)) { | |
36 | delete result; | |
37 | result = NULL; | |
38 | } | |
39 | ||
40 | return result; | |
b75a7d8f | 41 | } |