Java生成png文件字体不清晰_将Graphics2D写入BufferedImage - 字体分辨率较差

因此,我尝试通过绘制BufferedImage中的Graphics2D对象,然后使用ImageIO.write()将其写入文件来创建用于通用目的的标签。不幸的是,我遇到了一个问题,我无法弄清楚如何使字体的质量不被模糊和#39; (我无法想到英文中的单词,边缘有点切割或锯齿状,有点表示我认为渲染分辨率低)。有没有办法设置它,以便字体呈现在某个DPI /质量/分辨率?

/**

*

* @param data Array of Strings passed into label, where data[0] is the string to be barcoded

* @param titles Array of Strings passed into label parallel to data array, containing appropriate titles

* @throws IOException If

* @throws WriterException

*/

public static File createSeedBag(String[] titles,String[] data, Font[] fonts) throws IOException, WriterException{

/**

* TODO: Array of Fonts to customize Font

* Size customization

*/

BufferedImage theLabel;

BufferedImage theBarcode;

Graphics2D theGraphics;

File imageFile,

theFile;<

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值