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"); }