|
|
|
@@ -27,6 +27,8 @@ public class ImgYwsqhUtil { |
|
|
|
//模板图片 |
|
|
|
private static final String imgTempPath = "imgTemp/wxjjywsqh.jpg"; |
|
|
|
|
|
|
|
//字体路径 |
|
|
|
private static final String fontPath = "imgTemp/simhei.ttf"; |
|
|
|
|
|
|
|
/** |
|
|
|
* 生成图片证书 |
|
|
|
@@ -50,9 +52,9 @@ public class ImgYwsqhUtil { |
|
|
|
// backImgUrl.close(); |
|
|
|
Graphics g = backImg.getGraphics(); |
|
|
|
|
|
|
|
// Font font = Font.createFont(Font.TRUETYPE_FONT, ResourceUtils.getFile("classpath:"+fontPath)); |
|
|
|
// Font fTxtBottom = font.deriveFont(Font.PLAIN, 35); |
|
|
|
Font fTxtBottom = new Font("黑体", Font.PLAIN, 37); |
|
|
|
Font font = Font.createFont(Font.TRUETYPE_FONT, ResourceUtils.getFile("classpath:"+fontPath)); |
|
|
|
Font fTxtBottom = font.deriveFont(Font.PLAIN, 35); |
|
|
|
// Font fTxtBottom = new Font("黑体", Font.PLAIN, 37); |
|
|
|
Color myColorTxtBottom = Color.BLACK; |
|
|
|
|
|
|
|
g.setFont(fTxtBottom); |
|
|
|
|