Hello, I tried to use the createFont() function, but when I use it, the app just closes.
code:
PFont font;
void setup(){
font=createFont("FieldGuide.ttf",100);
textFont(font,100);
}
void draw() {
background(255);
fill(0);
text("just text",50,500);
}
Did I do something wrong? How is there any way to fix this?
Thanks in advance.
Hi @AniManOtaku ,
You can checkout this previous thread:
I know that there is a createFont option in processing’s pc version and that does the conversion of .ttf files to .vlw files.
But while using apde I cant even use any external font files and only use the system built it fonts of android.
Please help…!!
Also do you have any error logs or ways to see debug information?
Is your .ttf
file accessible and valid for a font file? Did you try to load it in Processing Java?
1 Like
Well i tried that and i edited the code so that it shows the error
the code:
PFont myFont;
void setup() {
size(200, 200);
background(255);
try{
myFont = createFont("CYRIL1.TTF", 28);
fill(0);
textFont(myFont);
}
catch(Exception e){
println(e);
}
textAlign(CENTER);
println("Привет мир");
}
void draw() {
text("Привет мир", width/2, height/2);
}
And this is what it shows:
And yeah i put the font in the data folder.
1 Like
jafal
October 12, 2023, 4:40am
5
Hi
On APDE it’s hard to work but with processing android mode works
1 Like
Unfortunately, i dont have PC.