我正在尝试使用 Java Graphics.DrawString 从 Wingding.ttf 字体中绘制字符。但生成的图像仅包含矩形而不是字符。
BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR);
Graphics graphics = image.getGraphics();
Font font = new Font("Wingdings", Font.PLAIN, 20);
graphics.setFont(font);
graphics.setColor(Color.BLACK);
graphics.drawString("\u00d8", 10, 10); // THREE-D TOP-LIGHTED RIGHTWARDS ARROWHEAD char
ImageIO.write(image, "PNG", new File(TEST_DATA_DIR + "bullet_char.png"));
我怎样才能做到这一点?