From ce2303279ddff27d33270b29b9e0a38ea45bfe8d Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 16 Jan 2022 07:21:23 -0500 Subject: [PATCH] try with non-deprecated drawTabbedText() but no dice --- app/src/processing/app/syntax/TextAreaPainter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/syntax/TextAreaPainter.java b/app/src/processing/app/syntax/TextAreaPainter.java index 959d2d347..f22215a96 100644 --- a/app/src/processing/app/syntax/TextAreaPainter.java +++ b/app/src/processing/app/syntax/TextAreaPainter.java @@ -468,7 +468,9 @@ public class TextAreaPainter extends JComponent implements TabExpander { line.count = length; // huh? suspicious // doesn't respect mono metrics, insists on spacing w/ fractional or something if (THROWBACK) { - x = Utilities.drawTabbedText(line, x, y, gfx, this, 0); + // Attempting with non-deprecated version. Rounding x isn't a problem + // because it's just the placement of eolmarkers after returning. + x = (int) Utilities.drawTabbedText(line, (float) x, (float) y, (Graphics2D) gfx, this, 0); } else { for (int i = 0; i < line.count; i++) { gfx.drawChars(line.array, line.offset + i, 1, x, y);