From 75c9c9729d49bfc13a1dfe18749091ed8971d455 Mon Sep 17 00:00:00 2001 From: lqdev Date: Mon, 27 Aug 2018 18:04:07 +0200 Subject: [PATCH] Fixed issue #5625 Made tab widths consistent across renderers --- core/src/processing/core/PGraphics.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 998062036..e651d7469 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -4595,6 +4595,10 @@ public class PGraphics extends PImage implements PConstants { * ignored. */ public void text(String str, float x, float y) { + // fix for #5625 pixelDensity(2) breaks the width of a tab ("\t") in JAVA2D + // makes the tab width consistent across renderers + str = str.replaceAll("\t", " "); + if (textFont == null) { defaultFontOrDeath("text"); }