Hi, blurry bitfonts have been an issue particularly with P3D for a while due to the rendering of images with this renderer. With controlP5 bitfonts are rendered to an image first, which is then displayed using the image() function. Proper rendering of bitfonts with 2D renderers and the OpenGL renderer worked fine with processing 2.0.a4 and earlier versions. Unfortunately this same issue also occurs now when using the OpenGL/P3D renderer with processing 2.0.a5, see issue 36
http://code.google.com/p/controlp5/issues/detail?id=36
However this blurriness in sharp edges or the imprecise rendering of pixels also happens for simple line renderings in processing 2.0.a5 using P3D or OpenGL with my settings (macbook pro NVIDIA GeForce 9400M) - use code below with processing 2.0.a5 - with processing 2.0.a4 the lines are blurred as well.
therefore there is currently not much to do - nor an easy fix - on controlP5's side for this particular rendering issue. You could use a ControlFont though to replace the bitfont with a PFont. have a look at the ControlFont example, the rendering quality of PFonts also depends on the renderer you are use and will vary in crispiness, smoothness, readability, etc. (use
- ControlFont.RENDER_2X = true; // since 0.7.3
to increase the readability especially for smaller fontsizes)
- // blurry edges where sharp edges are expected with processing 2.05a P3D/OPENGL mode
- // sketch to show behavior in sharpness of the white line which
- // renders ok but not with the given strokeWeight in the middle
- // of the window but blurs towards the top and bottom of the window.
- void setup() {
- size(400,400,OPENGL);
- }
- void draw() {
- background(0);
- noStroke();
- stroke(255);
- strokeWeight(1);
- for(int i=0;i<40;i++) {
- line(0,i*10,width,i*10);
- }
- }