Page 1 of 1

How do I change fonts?

Posted: Sun Aug 31, 2014 7:45 pm
by dragonspiral11
I wish to use different fonts in a program that I'm making. I use Old London for certain phrases and then switch back to Arial. I also want to use a Barcode font. Can I do that?

Re: How do I change fonts?

Posted: Sun Aug 31, 2014 8:08 pm
by davisdude
I would recommend taking a look at Robin's richtext. Other than that, I'm not sure what you mean by "Barcode font"...

Re: How do I change fonts?

Posted: Mon Sep 01, 2014 5:34 am
by micha
First, load a font:

Code: Select all

font = love.graphics.newFont( filename, size )
and then switch to it with

Code: Select all

love.graphics.setFont(font);
Everything you write after this command uses this font.

If you want to use different fonts at the same time, then load all of them (using multiple variable, e.g. fontArial, fontBarcode...) and switch between them.