更新时间:2022-10-17 21:57:01
我们可以将字符串属性切换为坏符号的字体,并使用 Graphics2D.drawString(AttributedCharacterIterator iterator,int x,int y)来渲染结果。 优点:这将适用于任何字体。 缺点:没有某种中间对象的缓存,这将工作得更慢更脏。
Graphics2D.drawString(AttributedCharacterIterator iterator,int x,int y)
如何在Java2D / Graphics2D中指定备用字体