String textToDisplay = "Hello World";
int counter = 0;

PFont font;

void setup() {
  size(600, 300);
  textAlign(CENTER, CENTER);

  font = createFont("OpenSans-Regular.ttf", 40);

  if (font != null) {
    textFont(font);
  } else {
    println("Font failed to load");
  }
}

void draw() {
  background(20);

  fill(255);
  textSize(40);
  text(textToDisplay, width/2, height/2);

  String formatted = nf(counter, 3);

  textSize(20);
  fill(180);
  text("#" + formatted, width/2, height/2 + 50);

  if (frameCount % 30 == 0) {
    counter++;
  }
}
