mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
del sun class
This commit is contained in:
parent
8bcb1daf99
commit
ff327057e4
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得字体对应字符串的长宽信息
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user