The text in a GWindow (using the G4P library) does render as well as the Processing window. This is the same problem we had before the pixelDensity() function was introduced. As pixelDensity() has to be called in setup() following size(), I cannot see how to call it when creating a GWindow. I've tried the P2D renderer for GWindow.getWindow and the results are even worse.
Here's the example output of the Processing and G4P windows, screen shots scaled up by a factor of 2.

The sketch which generated these is as follows `/* * compares text of different sizes drawn in the Processing window using pixelDensity() (as on a Mac retina display) * and also in a GWindow from G4P * limits the drawing in both windows to once to avoid overplotting */
import g4p_controls.*;
GWindow G4P_Window; boolean drawn = false; PFont font16;
void setup() { size(250, 100); pixelDensity(displayDensity()); //for retina display font16 = createFont("Dialog", 36, true); G4P_Window = GWindow.getWindow(this, "G4P Window", 100, 50, 250, 100, JAVA2D); //even worse with P2D renderer G4P_Window.addDrawHandler(this, "G4P_WindowDraw"); noLoop(); }
void draw() { background(0); fill(255); textFont(font16); textSize(8); text("This is in 8 point Dialog", 40, 20); textSize(10); text("This is in 10 point Dialog", 40, 40); textSize(12); text("This is in 12 point Dialog", 40, 60); textSize(14); text("This is in 14 point Dialog", 40, 80); }
void G4P_WindowDraw(PApplet app, GWinData data) { if (!drawn) { app.background(0); app.fill(255); app.textFont(font16); app.textSize(8); app.text("This is in 8 point Dialog", 40, 20); app.textSize(10); app.text("This is in 10 point Dialog", 40, 40); app.textSize(12); app.text("This is in 12 point Dialog", 40, 60); app.textSize(14); app.text("This is in 14 point Dialog", 40, 80); drawn = true; //limit to once only to avoid overplotting } } `