ControlFont and the P2D renderer
in
Contributed Library Questions
•
1 year ago
Hi!
I have problems getting controlP5's ControlFont working with the P2D renderer.
If I use textMode(SCREEN), the font looks nice, but is jammed in the top left corner, while the default textmode makes the font look blurry.
How should I fix this?
Test code:
I have problems getting controlP5's ControlFont working with the P2D renderer.
If I use textMode(SCREEN), the font looks nice, but is jammed in the top left corner, while the default textmode makes the font look blurry.
How should I fix this?
Test code:
- import controlP5.*;
- ControlP5 cp5;
- void setup(){
- size(300, 200, P2D);
-
- cp5 = new ControlP5(this);
- cp5.setControlFont(new ControlFont(createFont("Arial",15), 15));
- cp5.addButton("I'm a button!", 0, 100, 50, 100, 30);
-
- textMode(SCREEN);
- }
- void draw(){
- background(0);
- cp5.draw();
- }
1