diff options
Diffstat (limited to 'src/libjin/graphics/fonts/je_ttf.cpp')
-rw-r--r-- | src/libjin/graphics/fonts/je_ttf.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/libjin/graphics/fonts/je_ttf.cpp b/src/libjin/graphics/fonts/je_ttf.cpp index fec8cd4..40008d3 100644 --- a/src/libjin/graphics/fonts/je_ttf.cpp +++ b/src/libjin/graphics/fonts/je_ttf.cpp @@ -19,8 +19,8 @@ using namespace JinEngine::Graphics::Shaders; namespace JinEngine { - namespace Graphics - { + namespace Graphics + { namespace Fonts { @@ -234,29 +234,29 @@ namespace JinEngine int i = 0; #define glyphvertices_push(_x, _y, _u, _v) \ - vertex.x = _x; vertex.y = _y;\ - vertex.u = _u; vertex.v = _v;\ - glyphvertices.push_back(vertex); + vertex.x = _x; vertex.y = _y;\ + vertex.u = _u; vertex.v = _v;\ + glyphvertices.push_back(vertex); #define glyphlize(c)\ - do{\ - glyph = &findGlyph(c); \ - if (texture != glyph->atlas) \ - { \ - GlyphArrayDrawInfo info; \ - info.start = i; \ - info.count = 0; \ - info.texture = glyph->atlas; \ - texture = glyph->atlas; \ - glyphinfolist.push_back(info); \ - } \ - glyphinfolist[glyphinfolist.size() - 1].count += 4; \ - TTFGlyph::Bbox& bbox = glyph->bbox; \ - glyphvertices_push(p.x, p.y, bbox.x, bbox.y); \ - glyphvertices_push(p.x, p.y + glyph->height, bbox.x, bbox.y + bbox.h); \ - glyphvertices_push(p.x + glyph->width, p.y + glyph->height, bbox.x + bbox.w, bbox.y + bbox.h); \ - glyphvertices_push(p.x + glyph->width, p.y, bbox.x + bbox.w, bbox.y); \ - }while(0) + do{\ + glyph = &findGlyph(c); \ + if (texture != glyph->atlas) \ + { \ + GlyphArrayDrawInfo info; \ + info.start = i; \ + info.count = 0; \ + info.texture = glyph->atlas; \ + texture = glyph->atlas; \ + glyphinfolist.push_back(info); \ + } \ + glyphinfolist[glyphinfolist.size() - 1].count += 4; \ + TTFGlyph::Bbox& bbox = glyph->bbox; \ + glyphvertices_push(p.x, p.y, bbox.x, bbox.y); \ + glyphvertices_push(p.x, p.y + glyph->height, bbox.x, bbox.y + bbox.h); \ + glyphvertices_push(p.x + glyph->width, p.y + glyph->height, bbox.x + bbox.w, bbox.y + bbox.h); \ + glyphvertices_push(p.x + glyph->width, p.y, bbox.x + bbox.w, bbox.y); \ + }while(0) for (Codepoint c : text) { @@ -448,7 +448,7 @@ namespace JinEngine } } // namespace Fonts - } // namespace Graphics + } // namespace Graphics } // namespace JinEngine #endif // defined(jin_graphics)
\ No newline at end of file |