]> git.saurik.com Git - apple/icu.git/blame - icuSources/samples/layout/GnomeFontMap.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / samples / layout / GnomeFontMap.cpp
CommitLineData
b75a7d8f 1/*
f3c0d7a5
A
2 ******************************************************************************
3 * © 2016 and later: Unicode, Inc. and others. *
4 * License & terms of use: http://www.unicode.org/copyright.html#License *
5 ******************************************************************************
b75a7d8f 6 ******************************************************************************
46f4442e 7 * Copyright (C) 1998-2006, International Business Machines Corporation and *
b75a7d8f
A
8 * others. All Rights Reserved. *
9 ******************************************************************************
10 */
11
12#include <stdio.h>
13
46f4442e
A
14#include <ft2build.h>
15#include FT_FREETYPE_H
b75a7d8f
A
16
17#include "layout/LEFontInstance.h"
18#include "GnomeFontInstance.h"
19
20#include "GUISupport.h"
21#include "FontMap.h"
22#include "GnomeFontMap.h"
23
46f4442e 24GnomeFontMap::GnomeFontMap(FT_Library engine, const char *fileName, le_int16 pointSize, GUISupport *guiSupport, LEErrorCode &status)
b75a7d8f
A
25 : FontMap(fileName, pointSize, guiSupport, status), fEngine(engine)
26{
27 // nothing to do?
28}
29
30GnomeFontMap::~GnomeFontMap()
31{
32 // anything?
33}
34
35const LEFontInstance *GnomeFontMap::openFont(const char *fontName, le_int16 pointSize, LEErrorCode &status)
36{
374ca955
A
37 LEFontInstance *result = new GnomeFontInstance(fEngine, fontName, pointSize, status);
38
39 if (LE_FAILURE(status)) {
40 delete result;
41 result = NULL;
42 }
43
44 return result;
b75a7d8f 45}