mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add methods
This commit is contained in:
@@ -45,6 +45,17 @@ public class FontUtil {
|
||||
return e.getAllFonts();
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册字体到系统<br>
|
||||
* 此方法用于将字体文件注册到系统,之后即可在字体名称列表中看到此字体
|
||||
*
|
||||
* @param font 字体
|
||||
*/
|
||||
public static void registerFont(final Font font) {
|
||||
final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
ge.registerFont(font);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建默认字体
|
||||
*
|
||||
|
Reference in New Issue
Block a user