20 #ifndef ANTKEEPER_TYPE_FONT_HPP
21 #define ANTKEEPER_TYPE_FONT_HPP
58 virtual bool contains(char32_t code)
const = 0;
Abstract base class for fonts.
const math::fvec2 & get_kerning(char32_t first, char32_t second) const
Returns the kerning offset for a pair of glyphs.
virtual bool contains(char32_t code) const =0
Returns true if the font contains a glyph with the given character code.
void set_font_metrics(const font_metrics &metrics)
Sets the font metrics.
font()
Creates an empty font.
void kern(char32_t first, char32_t second, const math::fvec2 &offset)
Sets the kerning offset for a pair of glyphs.
const kerning_table & get_kerning_table() const
Returns the font's kerning table.
kerning_table kerning_table
virtual const glyph_metrics & get_glyph_metrics(char32_t code) const =0
Returns metrics describing a glyph.
const font_metrics & get_font_metrics() const
Returns metrics describing the font.
virtual ~font()
Destroys a font.
T offset(T longitude)
Calculates the UTC offset at a given longitude.
std::unordered_map< char32_t, std::unordered_map< char32_t, math::fvec2 > > kerning_table
Table containing kerning offsets for pairs of glyphs.
Metrics describing properties of a font.
Metrics describing properties of a glyph.