]> git.saurik.com Git - apple/icu.git/blame - icuSources/samples/layout/GDIFontMap.cpp
ICU-57166.0.1.tar.gz
[apple/icu.git] / icuSources / samples / layout / GDIFontMap.cpp
CommitLineData
b75a7d8f
A
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
18GDIFontMap::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
24GDIFontMap::~GDIFontMap()
25{
26 // anything?
27}
28
29const LEFontInstance *GDIFontMap::openFont(const char *fontName, le_int16 pointSize, LEErrorCode &status)
30{
374ca955
A
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;
b75a7d8f 39}