]> git.saurik.com Git - apple/icu.git/blame - icuSources/samples/layout/GnomeFontMap.cpp
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / samples / layout / GnomeFontMap.cpp
CommitLineData
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 20GnomeFontMap::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
26GnomeFontMap::~GnomeFontMap()
27{
28 // anything?
29}
30
31const 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}