Arif Rabbani
Arif Rabbani

Reputation: 131

How to use custom fonts with OpenIMAJ

I am working on a project where I want to use custom fonts to draw text on image. I don't want to use the inbuilt OpenIMAJ fonts. Is there a way to do that?

Upvotes: 0

Views: 104

Answers (1)

Jon
Jon

Reputation: 841

Use the GeneralFont class to access all system fonts via AWT:

MBFImage img = new MBFImage( 800, 600, 3 );
img.drawText( "OpenIMAJ", 20, 100, new GeneralFont("Arial", Font.PLAIN ), 120, RGBColour.WHITE );

Upvotes: 0

Related Questions