Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在做一个项目,我想使用自定义字体在图像上绘制文本。我不想使用内置的 OpenIMAJ 字体。有没有办法做到这一点?
使用GeneralFont该类通过 AWT 访问所有系统字体:
GeneralFont
MBFImage img = new MBFImage( 800, 600, 3 ); img.drawText( "OpenIMAJ", 20, 100, new GeneralFont("Arial", Font.PLAIN ), 120, RGBColour.WHITE );