Gnash
0.8.11dev
libcore
FreetypeGlyphsProvider.h
Go to the documentation of this file.
1
// FreetypeGlyphsProvider.h: Freetype glyphs manager
2
//
3
// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
4
// Free Software Foundation, Inc
5
//
6
// This program is free software; you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation; either version 3 of the License, or
9
// (at your option) any later version.
10
//
11
// This program is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with this program; if not, write to the Free Software
18
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
20
#ifndef GNASH_FREETYPE_H
21
#define GNASH_FREETYPE_H
22
23
#include <string>
24
#include <memory>
// for unique_ptr
25
#include <mutex>
26
#include <cstdint>
27
28
#ifdef USE_FREETYPE
29
# include <ft2build.h>
30
# include FT_FREETYPE_H
31
# include FT_GLYPH_H
32
#endif
33
34
// Forward declarations
35
namespace
gnash
{
36
namespace
SWF
{
37
class
ShapeRecord;
38
}
39
}
40
41
42
namespace
gnash
{
43
45
//
56
class
FreetypeGlyphsProvider
57
{
58
59
public
:
60
62
//
76
static
std::unique_ptr<FreetypeGlyphsProvider> createFace(
77
const
std::string&
name
,
bool
bold,
bool
italic);
78
80
//
83
~
FreetypeGlyphsProvider
();
84
85
89
//
104
std::unique_ptr<SWF::ShapeRecord> getGlyph(std::uint16_t
code
,
105
float
& advance);
106
108
float
ascent()