summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/text.c4
-rw-r--r--src/ui/text.h1
2 files changed, 2 insertions, 3 deletions
diff --git a/src/ui/text.c b/src/ui/text.c
index 01a9d606..0a3b7b2e 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -1382,9 +1382,6 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) {
1382 float xCursorMax = 0.0f; 1382 float xCursorMax = 0.0f;
1383 const iBool isMonospaced = d->isMonospaced; 1383 const iBool isMonospaced = d->isMonospaced;
1384 iAssert(args->text.end >= args->text.start); 1384 iAssert(args->text.end >= args->text.start);
1385// if (args->continueFrom_out) {
1386// *args->continueFrom_out = args->text.end;
1387// }
1388 /* Split the text into a number of attributed runs that specify exactly which 1385 /* Split the text into a number of attributed runs that specify exactly which
1389 font is used and other attributes such as color. (HarfBuzz shaping is done 1386 font is used and other attributes such as color. (HarfBuzz shaping is done
1390 with one specific font.) */ 1387 with one specific font.) */
@@ -1392,6 +1389,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) {
1392 init_AttributedText(&attrText, args->text, args->maxLen, d, get_Color(args->color), 1389 init_AttributedText(&attrText, args->text, args->maxLen, d, get_Color(args->color),
1393 args->baseDir); 1390 args->baseDir);
1394 if (args->wrap) { 1391 if (args->wrap) {
1392 args->wrap->baseDir = attrText.isBaseRTL ? -1 : +1;
1395 /* TODO: Duplicated args? */ 1393 /* TODO: Duplicated args? */
1396 iAssert(equalRange_Rangecc(args->wrap->text, args->text)); 1394 iAssert(equalRange_Rangecc(args->wrap->text, args->text));
1397 /* Initialize the wrap range. */ 1395 /* Initialize the wrap range. */
diff --git a/src/ui/text.h b/src/ui/text.h
index d3a9f844..41e7671e 100644
--- a/src/ui/text.h
+++ b/src/ui/text.h
@@ -207,6 +207,7 @@ struct Impl_WrapText {
207 enum iWrapTextMode mode; 207 enum iWrapTextMode mode;
208 iBool (*wrapFunc)(iWrapText *, iRangecc wrappedText, int origin, int advance, iBool isBaseRTL); 208 iBool (*wrapFunc)(iWrapText *, iRangecc wrappedText, int origin, int advance, iBool isBaseRTL);
209 void * context; 209 void * context;
210 int baseDir; /* set to +1 for LTR, -1 for RTL
210 /* internal */ 211 /* internal */
211 iRangecc wrapRange_; 212 iRangecc wrapRange_;
212}; 213};