style: 后端水印中文字体更换

This commit is contained in:
wangjiahao
2025-01-08 16:05:45 +08:00
committed by 王嘉豪
parent d787775cd8
commit 95ae6f8495

View File

@@ -107,7 +107,7 @@ public class ExcelWatermarkUtils {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
// 设置字体
g2d.setFont(new Font("Microsoft YaHei", Font.PLAIN, fontSize));
g2d.setFont(new Font(null, Font.PLAIN, fontSize));
g2d.setColor(new Color(baseColor.getRed(), baseColor.getGreen(), baseColor.getBlue(), 50)); // 半透明颜色
g2d.rotate(radians, width / 2.0, height / 2.0); // 旋转文字
// 绘制文字