Skip to content

Commit 6c00f1f

Browse files
MatanZfornwall
authored andcommitted
Fixed: Use Canvas.drawTextRun instead of drawText
drawText does (very) basic BiDi, which causes inconsistent behaviour. This ensures everything is LtR.
1 parent 0314259 commit 6c00f1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

terminal-view/src/main/java/com/termux/view/TerminalRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ private void drawTextRun(Canvas canvas, char[] text, int[] palette, float y, int
233233
mTextPaint.setColor(foreColor);
234234

235235
// The text alignment is the default Paint.Align.LEFT.
236-
canvas.drawText(text, startCharIndex, runWidthChars, left, y - mFontLineSpacingAndAscent, mTextPaint);
236+
canvas.drawTextRun(text, startCharIndex, runWidthChars, startCharIndex, runWidthChars, left, y - mFontLineSpacingAndAscent, false, mTextPaint);
237237
}
238238

239239
if (savedMatrix) canvas.restore();

0 commit comments

Comments
 (0)