Commit 75d8aa0b by 王祖波

字体更换

parent 6586607e
...@@ -235,10 +235,14 @@ public class ImageCombined { ...@@ -235,10 +235,14 @@ public class ImageCombined {
} }
private static void addWhiteSpace(Graphics2D g, int width, int finalHeight, BufferedImage qrCode, int qrWidth,String lineOne,String lineTwo) { private static void addWhiteSpace(Graphics2D g, int width, int finalHeight, BufferedImage qrCode, int qrWidth,String lineOne,String lineTwo) {
String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
for (String fontName : fontNames) {
logger.info(fontName);
}
// 添加白色背景 // 添加白色背景
g.setColor(Color.WHITE); g.setColor(Color.WHITE);
g.fillRect(0, finalHeight - WHITE_SPACE_HEIGHT, width, WHITE_SPACE_HEIGHT); g.fillRect(0, finalHeight - WHITE_SPACE_HEIGHT, width, WHITE_SPACE_HEIGHT);
String font = ApolloUtils.combinedFonts(); String font = "PingFang SC";
// 添加门店名称,距底部88px // 添加门店名称,距底部88px
g.setColor(new Color(36, 40, 53)); g.setColor(new Color(36, 40, 53));
g.setFont(new Font(font, Font.PLAIN, 30)); g.setFont(new Font(font, Font.PLAIN, 30));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment