37 class FreetypeGlyphsProvider;
96 Font(std::unique_ptr<SWF::DefineFontTag> ft);
108 Font(std::string
name,
bool bold =
false,
bool italic =
false);
112 std::uint16_t codeTableLookup(
int glyph,
bool embedded)
const;
124 bool matches(
const std::string&
name,
bool bold,
bool italic)
const;
142 const std::string&
name()
const {
return _name; }
161 int get_glyph_index(std::uint16_t
code,
bool embedded)
const;
172 float get_advance(
int glyph_index,
bool embedded)
const;
183 float get_kerning_adjustment(
int last_code,
int this_code)
const;
190 size_t unitsPerEM(
bool embedded)
const;
195 float ascent(
bool embedded)
const;
200 float descent(
bool embedded)
const;
205 float leading()
const;
235 GlyphInfo(std::unique_ptr<SWF::ShapeRecord> glyph,
float advance);
237 std::unique_ptr<SWF::ShapeRecord>
glyph;
254 void setName(
const std::string&
name);
259 void setFlags(std::uint8_t flags);
264 void setCodeTable(std::unique_ptr<CodeTable> table);
267 GlyphInfoRecords::size_type glyphCount()
const;
285 int add_os_glyph(std::uint16_t code);
288 std::unique_ptr<SWF::DefineFontTag> _fontTag;
291 GlyphInfoRecords _deviceGlyphTable;
294 std::string _displayName;
295 std::string _copyrightName;
314 std::shared_ptr<const CodeTable> _embeddedCodeTable;
317 CodeTable _deviceCodeTable;
319 typedef std::map<kerning_pair, float> kernings_table;
320 kernings_table m_kerning_pairs;
322 mutable std::unique_ptr<FreetypeGlyphsProvider> _ftProvider;
331 #endif // GNASH_FONT_H Glyph info structure.
Definition: Font.h:227
std::string copyrightName
Definition: Font.h:223
const std::string & name() const
Get name of this font.
Definition: Font.h:142
A pair of strings describing the font.
Definition: Font.h:220
A Font resource.
Definition: Font.h:89
For stuff that's tricky to keep track of w/r/t ownership & cleanup. The only use for this class seems...
Definition: ref_counted.h:34
bool isBold() const
Return true if the font is bold.
Definition: Font.h:208
Definition: GnashKey.h:157
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
std::uint16_t m_char1
Definition: Font.h:54
std::uint16_t m_char0
Definition: Font.h:53
code
Definition: GnashKey.h:43
float advance
Definition: Font.h:239
std::string displayName
Definition: Font.h:222
bool operator==(const kerning_pair &k) const
Definition: Font.h:56
bool isItalic() const
Return true if the font is italic.
Definition: Font.h:213
bool operator<(const event_id &a, const event_id &b)
Comparator for use in stdlib containers.
Definition: event_id.h:170
std::unique_ptr< SWF::ShapeRecord > glyph
Definition: Font.h:237
std::vector< GlyphInfo > GlyphInfoRecords
Definition: Font.h:242
Truetype font rasterizer/converter based on freetype library.
Definition: FreetypeGlyphsProvider.h:56
std::map< std::uint16_t, int > CodeTable
Definition: Font.h:94
Holds information needed to draw a shape.
Definition: ShapeRecord.h:126
std::string name
Definition: LocalConnection_as.cpp:149
Definition: GnashKey.h:331