In a folder called data, I have a font file called font.ttf.
I want to read it in, like this:
try {
Font f = Font.createFont(Font.TRUETYPE_FONT,
new File("data/font.ttf")).deriveFont(12.0);
} catch (IOException | FontFormatException e) {}
That worked fine up until I removed the same font from the system (it's still in the data folder!). Now, it's just showing Java's generic font.
Is it even possible to read in a font from a file which is not in the System Fonts folder?