summaryrefslogtreecommitdiff
path: root/src/ui/text.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-07-21 08:55:12 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-07-21 08:55:12 +0300
commit9ab619bd3c57d681a3906abf0dc10d5376d01319 (patch)
tree664d546bb36cd24afcf6d5fec2d0d7289b1f97aa /src/ui/text.h
parentaaa5d18c3f1540c18bb9dae80927df2803c42049 (diff)
Text: Finding the advance position of a character
Diffstat (limited to 'src/ui/text.h')
-rw-r--r--src/ui/text.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ui/text.h b/src/ui/text.h
index a82da22c..322d2938 100644
--- a/src/ui/text.h
+++ b/src/ui/text.h
@@ -206,15 +206,17 @@ enum iWrapTextMode {
206 206
207struct Impl_WrapText { 207struct Impl_WrapText {
208 /* arguments */ 208 /* arguments */
209 iRangecc text; 209 iRangecc text;
210 int maxWidth; 210 int maxWidth;
211 enum iWrapTextMode mode; 211 enum iWrapTextMode mode;
212 iBool (*wrapFunc)(iWrapText *, iRangecc wrappedText, int origin, int advance, iBool isBaseRTL); 212 iBool (*wrapFunc)(iWrapText *, iRangecc wrappedText, int origin, int advance, iBool isBaseRTL);
213 void * context; 213 void * context;
214 int baseDir; /* set to +1 for LTR, -1 for RTL */ 214 int baseDir; /* set to +1 for LTR, -1 for RTL */
215 iInt2 hitPoint; 215 iInt2 hitPoint; /* sets hitChar_out */
216 const char *hitChar; /* sets hitAdvance_out */
216 /* output */ 217 /* output */
217 const char *hitChar_out; 218 const char *hitChar_out;
219 iInt2 hitAdvance_out;
218 float hitGlyphNormX_out; /* normalized X inside the glyph */ 220 float hitGlyphNormX_out; /* normalized X inside the glyph */
219 /* internal */ 221 /* internal */
220 iRangecc wrapRange_; 222 iRangecc wrapRange_;