mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Added basic kerning support for TrueType and BMFont fonts (resolves issue #1055.)
This commit is contained in:
@@ -211,6 +211,7 @@ private:
|
||||
love::font::GlyphData *getRasterizerGlyphData(uint32 glyph);
|
||||
const Glyph &addGlyph(uint32 glyph);
|
||||
const Glyph &findGlyph(uint32 glyph);
|
||||
float getKerning(uint32 leftglyph, uint32 rightglyph);
|
||||
void printv(const Matrix4 &t, const std::vector<DrawCommand> &drawcommands, const std::vector<GlyphVertex> &vertices);
|
||||
|
||||
std::vector<StrongRef<love::font::Rasterizer>> rasterizers;
|
||||
@@ -227,6 +228,9 @@ private:
|
||||
// maps glyphs to glyph texture information
|
||||
std::unordered_map<uint32, Glyph> glyphs;
|
||||
|
||||
// map of left/right glyph pairs to horizontal kerning.
|
||||
std::unordered_map<uint64, float> kerning;
|
||||
|
||||
FontType type;
|
||||
Texture::Filter filter;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user