How can I get bold and italic styling for text using the default font? I need the rendered text to be (approximately) the same whether the sketch is run on Windows, Mac or Linux.
Hello @Gadger ,
Not sure what the default is.
You could include a font in your sketch!
Take a look here:
PFont myFont;
void setup()
{
//printArray(PFont.list());
size(700, 130);
myFont = loadFont("Arial-BoldItalicMT-48.vlw");
textFont(myFont, 32);
fill(0); // Set text color to black
text("This is bold and italic text !", 50, 70);
}
:)
1 Like
Thanks glv. I can’t find the specification of the default sans-serif font, so I’ll use some open fonts that look similar, along the lines you suggested.