mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
del sun class
This commit is contained in:
@@ -2,7 +2,6 @@ package cn.hutool.core.img;
|
||||
|
||||
import cn.hutool.core.exceptions.UtilException;
|
||||
import cn.hutool.core.io.IORuntimeException;
|
||||
import sun.font.FontDesignMetrics;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
@@ -94,18 +93,6 @@ public class FontUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得字体对应字符串的长宽信息
|
||||
*
|
||||
* @param font 字体
|
||||
* @param str 字符串
|
||||
* @return 长宽信息
|
||||
*/
|
||||
public static Dimension getDimension(Font font, String str) {
|
||||
final FontMetrics metrics = FontDesignMetrics.getMetrics(font);
|
||||
return getDimension(FontDesignMetrics.getMetrics(font), str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得字体对应字符串的长宽信息
|
||||
*
|
||||
|
Reference in New Issue
Block a user