Ok, I will skip the part explaining that I'm an idiot.
The above difference comes from the following revision in 4.3:
"Use calculated text height instead of OS ascent for better vertical centering. Note: this may cause some sketches to look slightly different if textAlign(..., CENTER) is being used."
https://github.com/processing/processing4/issues/739
Which is amazing it has been fixed!
Downside is that for OpenGL it's still like the old way.
Looking at the code it seems an easy fix (same as the fix for JAVA2D), which is commenting most code so it's just using super.textAscent();
Processing 4.2:
Processing 4.3:
Ok, I will skip the part explaining that I'm an idiot.
The above difference comes from the following revision in 4.3:
Which is amazing it has been fixed! Downside is that for OpenGL it's still like the old way. Looking at the code it seems an easy fix (same as the fix for JAVA2D), which is commenting most code so it's just using
super.textAscent();
https://github.com/processing/processing4/blob/c57069fdca888e614bf52caa4cb7999277ae32e0/core/src/processing/opengl/PGraphicsOpenGL.java#L3430C14-L3430C14
If such a fix would be implemented, then one extra thing that could be considered is deprecating the following two functions in
PJOGL.java
: