|
|
@@ -112,7 +112,7 @@ public class GenCodeService {
|
|
|
private int measureText(String text, float fontSize) throws IOException, FontFormatException {
|
|
|
AffineTransform affinetransform = new AffineTransform();
|
|
|
FontRenderContext frc = new FontRenderContext(affinetransform, true, true);
|
|
|
- Font font = Font.createFont(Font.TRUETYPE_FONT, this.getClass().getResourceAsStream("/font/PingFangRegular.ttf"));
|
|
|
+ Font font = Font.createFont(Font.TRUETYPE_FONT, this.getClass().getResourceAsStream("/font/SourceHanSansCN-Normal.ttf"));
|
|
|
return (int) (font.deriveFont(fontSize).getStringBounds(text, frc).getWidth());
|
|
|
}
|
|
|
|