diff options
author | chai <chaifix@163.com> | 2018-10-21 16:21:16 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-21 16:21:16 +0800 |
commit | 07770f3ad369ff47386310b731d349f7af1fe0d9 (patch) | |
tree | 7547b1a8b2beaceb31ea1b62edbdaa5cd6a1b247 /src/libjin/Graphics/Font/je_ttf.cpp | |
parent | 066e5987c515dfc34537d73ca9d2a81ddd1f9e1b (diff) |
*修改编译控制
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 |