mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add method
This commit is contained in:
parent
45be77b926
commit
d8e3c7157d
@ -19,10 +19,7 @@ package org.dromara.hutool.swing.img;
|
|||||||
import org.dromara.hutool.core.exception.ExceptionUtil;
|
import org.dromara.hutool.core.exception.ExceptionUtil;
|
||||||
import org.dromara.hutool.core.io.IORuntimeException;
|
import org.dromara.hutool.core.io.IORuntimeException;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import java.awt.*;
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.FontFormatException;
|
|
||||||
import java.awt.FontMetrics;
|
|
||||||
import java.awt.font.FontRenderContext;
|
import java.awt.font.FontRenderContext;
|
||||||
import java.awt.geom.AffineTransform;
|
import java.awt.geom.AffineTransform;
|
||||||
import java.awt.geom.Rectangle2D;
|
import java.awt.geom.Rectangle2D;
|
||||||
@ -38,6 +35,16 @@ import java.io.InputStream;
|
|||||||
*/
|
*/
|
||||||
public class FontUtil {
|
public class FontUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得系统中支持的所有字体
|
||||||
|
*
|
||||||
|
* @return 字体数组
|
||||||
|
*/
|
||||||
|
public static Font[] getAllFonts() {
|
||||||
|
final GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||||
|
return e.getAllFonts();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建默认字体
|
* 创建默认字体
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user