mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #5633 from liquid600pgm/master
Fix for #5625 - Made tab widths consistent across renderers
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user