0

我正在做一个项目,我想使用自定义字体在图像上绘制文本。我不想使用内置的 OpenIMAJ 字体。有没有办法做到这一点?

4

1 回答 1

0

使用GeneralFont该类通过 AWT 访问所有系统字体:

MBFImage img = new MBFImage( 800, 600, 3 );
img.drawText( "OpenIMAJ", 20, 100, new GeneralFont("Arial", Font.PLAIN ), 120, RGBColour.WHITE );
于 2018-05-07T09:24:28.250 回答