fix(图表): 修复后端excel水印在一些系统无法识别中文问题

This commit is contained in:
wangjiahao
2025-01-08 15:13:21 +08:00
committed by 王嘉豪
parent af6c1d7492
commit d1df6f0531

View File

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