Skip to content

Instantly share code, notes, and snippets.

@jensschulze
Created August 26, 2015 11:43
Show Gist options
  • Save jensschulze/a623c03868febca4060b to your computer and use it in GitHub Desktop.
Save jensschulze/a623c03868febca4060b to your computer and use it in GitHub Desktop.
/*
* Issue: Text display problems.
* I guess it's probably a bug in Processing 3.0b5.
*
* Text will be rendered incorrectly on:
* Windows 10 (Java 8u51, Processing 3.0b5, set to 4096MB max. memory): some characters incomplete
* Mac OS X 10.9.5 (Java 8u51, Processing 3.0b5, set to 4096MB max. memory): fast flickering (switching between desktop and processing sketch each frame)
*
* Text will be rendered correctly on:
* Windows 7 (Java 8, Processing 3.0b3)
* Mac OS X 10.9.5 (Java 8u51, Processing 3.0b3, set to 4096MB max. memory)
*
*/
int iFontSize = 256; // The rendering issue on the Windows 10 system starts at font sizes above roughly 160
String sTextAbc1 = "ABCOPQRST";
String sTextAbc2 = "ABCQRSTUV";
PFont pfFont;
void setup()
{
fullScreen(P2D); // Doesn't matter if we use fullscreen() or size()
colorMode(RGB, 255, 255, 255);
background(255, 0, 0);
fill(255, 255, 255);
pfFont = createFont("Arial Black", iFontSize); // Doesn't matter if we create the font here or in the "Tools" menu
textFont(pfFont, iFontSize);
text(sTextAbc1, 0, 340);
text(sTextAbc2, 0, 740);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment