Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Question about Canvas.drawText

7 views
Skip to first unread message

Guillermo Rodriguez Garcia

unread,
Jan 21, 2024, 2:22:41 PM1/21/24
to PlayN
Hi all,

Canvas has fillText and strokeText functions that take a TextLayout parameter, so that's where one configures the font typeface and size to use.

Then there's also a drawText function that just takes a String. The javadoc says that "The text will be drawn in the current fill color". That's good, however how is the font configured? I was looking for a way to setup a default font in the Canvas instance itself or perhaps in the Graphics object, but couldn't find any.

What is the intended use of this method?

BR,

Guillermo
Reply all
Reply to author
Forward
0 new messages