custom fonts on android?
in
Android Processing
•
8 months ago
I put my custom fonts in the 'data' folder, and implement them with createFont(), using the name as listed by PFont.list().
This sketch works correctly in Java mode.
When I run on the Android emulator, I get a warning: "Inefficient font rendering: use createFont() with a TTF/OTF instead of loadFont(); however, the fonts render correctly.
When run on my device, I get the same warning, but the fonts fallback to some Android system font.
I'm on a Nexus 7.
What am I doing wrong? Seems like the fonts aren't getting copied to the device. println(PFont.list()) shows only Android system fonts, though I think that's to be expected, hence using createFont() instead of loadFont().
EDIT: I tested loading and drawing an image in the 'data' folder, and that works fine, so I think it's less likely that the fonts aren't getting copied than that they're not getting used. Maybe my .otf files are not good enough for Android?
1