修改了资源路径7
This commit is contained in:
parent
492eef5bc0
commit
8962369be6
@ -55,7 +55,8 @@ public class CertService {
|
|||||||
g2d.drawImage(circleAvatar, 465, 620, null);
|
g2d.drawImage(circleAvatar, 465, 620, null);
|
||||||
|
|
||||||
// 3. 添加姓名
|
// 3. 添加姓名
|
||||||
font = new Font("Microsoft YaHei", Font.PLAIN, 40); // 可根据模板调整大小
|
font = loadFont("static/cert/msyh.ttf", 40f);
|
||||||
|
// font = new Font("Microsoft YaHei", Font.PLAIN, 40); // 可根据模板调整大小
|
||||||
g2d.setFont(font);
|
g2d.setFont(font);
|
||||||
|
|
||||||
customColor = Color.decode("#111827");
|
customColor = Color.decode("#111827");
|
||||||
@ -63,7 +64,8 @@ public class CertService {
|
|||||||
g2d.drawString(name, 465, 790);
|
g2d.drawString(name, 465, 790);
|
||||||
|
|
||||||
// 4. 添加证书内容
|
// 4. 添加证书内容
|
||||||
font = new Font("Microsoft YaHei", Font.PLAIN, 48); // 可根据模板调整大小
|
// font = new Font("Microsoft YaHei", Font.PLAIN, 48); // 可根据模板调整大小
|
||||||
|
font = loadFont("static/cert/msyh.ttf", 48f);
|
||||||
g2d.setFont(font);
|
g2d.setFont(font);
|
||||||
|
|
||||||
customColor = Color.decode("#111827");
|
customColor = Color.decode("#111827");
|
||||||
@ -74,7 +76,8 @@ public class CertService {
|
|||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
||||||
String currentDate = sdf.format(new Date());
|
String currentDate = sdf.format(new Date());
|
||||||
|
|
||||||
font = new Font("Microsoft YaHei", Font.PLAIN, 34); // 可根据模板调整大小
|
// font = new Font("Microsoft YaHei", Font.PLAIN, 34); // 可根据模板调整大小
|
||||||
|
font = loadFont("static/cert/msyh.ttf", 34f);
|
||||||
g2d.setFont(font);
|
g2d.setFont(font);
|
||||||
|
|
||||||
customColor = Color.decode("#111827");
|
customColor = Color.decode("#111827");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user