diff options
Diffstat (limited to 'src/libjin/Graphics/Font/je_ttf.cpp')
-rw-r--r-- | src/libjin/Graphics/Font/je_ttf.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libjin/Graphics/Font/je_ttf.cpp b/src/libjin/Graphics/Font/je_ttf.cpp index 0ee02ab..a11efb0 100644 --- a/src/libjin/Graphics/Font/je_ttf.cpp +++ b/src/libjin/Graphics/Font/je_ttf.cpp @@ -1,5 +1,5 @@ #include "../../core/je_configuration.h" -#if LIBJIN_MODULES_RENDER +#if defined(jin_graphics) #include <stdio.h> @@ -279,6 +279,13 @@ namespace JinEngine p.x = 0; continue; } + if (c == 0x09) + { + // tab = 4*space + unsigned cw = getCharWidth(0x20); + p.x += cw * 4; + continue; + } glyphlize(c); p.x += glyph->width + spacing; i += 4; @@ -453,4 +460,4 @@ namespace JinEngine } // namespace Graphics } // namespace JinEngine -#endif // LIBJIN_MODULES_RENDER
\ No newline at end of file +#endif // defined(jin_graphics)
\ No newline at end of file |