Added Font:setFallbacks(otherfont, ...). Resolves issue #1041.

Note that general font metrics are largely still based on the original (non-fallback) font, whereas glyph sizes are based on the fallback fonts when those are used to get the glyph.
This commit is contained in:
Alex Szpakowski
2015-05-02 18:07:35 -03:00
parent 4e1011a52e
commit a35ccb4426
4 changed files with 72 additions and 8 deletions
+3 -1
View File
@@ -175,6 +175,8 @@ public:
bool hasGlyph(uint32 glyph) const;
bool hasGlyphs(const std::string &text) const;
void setFallbacks(const std::vector<Font *> &fallbacks);
uint32 getTextureCacheID() const;
static bool getConstant(const char *in, AlignMode &out);
@@ -211,7 +213,7 @@ private:
const Glyph &findGlyph(uint32 glyph);
void printv(const Matrix &t, const std::vector<DrawCommand> &drawcommands, const std::vector<GlyphVertex> &vertices);
StrongRef<love::font::Rasterizer> rasterizer;
std::vector<StrongRef<love::font::Rasterizer>> rasterizers;
int height;
float lineHeight;