public class Fonts extends Object
Constructor and Description |
---|
Fonts() |
Modifier and Type | Method and Description |
---|---|
static boolean |
exist(String name)
检查当前系统中是否有该字体
|
static Font |
get(String name,
int style,
int size)
获得指定字体
|
static Font |
random(int style,
int size)
获得随机字体
|
public static Font random(int style, int size)
style
- 字体样式 支持:Font.PLAIN Font.BOLD Font.ITALICsize
- 字体大小public static Font get(String name, int style, int size)
name
- 字体名称style
- 字体样式 支持:Font.PLAIN Font.BOLD Font.ITALICsize
- 字体大小public static boolean exist(String name)
name
- 字体名称Copyright © 2017. All rights reserved.