Blob Blame Raw

#include <math.h>

#include <helianthus.h>

#include "font.h"



static Font font;


void fontInit() {
	font = createFont("data/fonts/blackcry.ttf");
}


void fontDraw() {
	saveState();
	
	double x = 512;
	double y = 256;
	
	fill(colorByName("1 0 0 0.5"));
	textSize(64*(1+sin(worldGetSeconds()/4)));
	text("Here is the\nleft aligned\ntext. VAW.", x, y);
	
	noFill();
	textFont(font);
	textAlign(HALIGN_RIGHT, VALIGN_TOP);
	text("Here is the\nright aligned\ntext. VAW.", x, y);
	
	restoreState();
}