2 #include "oxygine-include.h" 3 #include "core/Object.h" 8 #include <unordered_set> 29 spNativeTexture texture;
31 bool operator == (
const glyph& r)
const {
return ch == r.ch && opt == r.opt;}
33 bool operator < (
const glyph& r)
const {
return ch < r.ch; }
39 std::size_t operator()(
const glyph& k)
const 41 return std::hash<int>()(k.ch + k.opt);
52 void init(
const char* name,
int size,
int baselineDistance,
int lineHeight,
bool sdf =
false);
54 void addGlyph(
const glyph& g);
57 void setScale(
float scale) { _scale = scale; }
58 void setBaselineDistance(
int d) { _baselineDistance = d; }
60 const glyph* getGlyph(
int code,
const glyphOptions& opt)
const;
61 int getBaselineDistance()
const;
63 float getScale()
const;
67 const glyph* findGlyph(
int code,
const glyphOptions& opt)
const;
69 virtual bool loadGlyph(
int code, glyph&,
const glyphOptions& opt) {
return false; }
72 typedef std::set<glyph> glyphs;
74 typedef std::unordered_set<glyph, GlyphHasher> glyphs;
83 int _baselineDistance;
–oxgl-end–!
Definition: Actor.h:14