summaryrefslogtreecommitdiff
path: root/src/gfx_layout.h
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2013-08-05 20:35:23 +0000
committermichi_cc <michi_cc@openttd.org>2013-08-05 20:35:23 +0000
commit33f3cf3a5daeaf9e6e5b5414696f93676249bc41 (patch)
tree9de7c6fec9a311f66a3e598cdb3286cfdd1cadff /src/gfx_layout.h
parent9d7ec75fc0a396b47f91a5f7ec4bea59024fea5f (diff)
downloadopenttd-33f3cf3a5daeaf9e6e5b5414696f93676249bc41.tar.xz
(svn r25651) -Fix: Textbuf caret rendering for complex scripts (e.g. Tamil).
Diffstat (limited to 'src/gfx_layout.h')
-rw-r--r--src/gfx_layout.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gfx_layout.h b/src/gfx_layout.h
index c252d15eb..27c1e9c08 100644
--- a/src/gfx_layout.h
+++ b/src/gfx_layout.h
@@ -168,6 +168,8 @@ class Layouter : public AutoDeleteSmallVector<ParagraphLayout::Line *, 4> {
typedef WChar CharType; ///< The type of character used within the layouter.
#endif /* WITH_ICU */
+ const char *string; ///< Pointer to the original string.
+
size_t AppendToBuffer(CharType *buff, const CharType *buffer_last, WChar c);
ParagraphLayout *GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping);
@@ -209,6 +211,7 @@ class Layouter : public AutoDeleteSmallVector<ParagraphLayout::Line *, 4> {
public:
Layouter(const char *str, int maxw = INT32_MAX, TextColour colour = TC_FROMSTRING, FontSize fontsize = FS_NORMAL);
Dimension GetBounds();
+ Point GetCharPosition(const char *ch) const;
static void ResetFontCache(FontSize size);
static void ResetLineCache();