src/org/nutz/img/Fonts.java
public static Font get(String name, int style, int size) {
        if (Strings.isBlank(name)) {
            // 尝试微软雅黑，黑体，宋体等常见字体
            Font ff = find(commonFonts, style, size);
            if (ff == null) {
                throw new RuntimeException("Please manually set the font, or add some common fonts in the system");
            }
            return ff;
        }
        return new Font(name, style, size);
    }
public static Font get(String name, int style, int size) {
        if (Strings.isBlank(name)) {
            // 尝试微软雅黑，黑体，宋体等常见字体
            Font ff = find(commonFonts, style, size);
            if (ff == null) {
                throw new RuntimeException("Please manually set the font, or add some common fonts in the system");
            }
            return ff;
        }
        return new Font(name, style, size);
    }
public static Font get ( String name , int style , int size ) { if ( Strings . isBlank ( name ) ) { // 尝试微软雅黑，黑体，宋体等常见字体 Font ff = find ( commonFonts , style , size ) ; if ( ff == null ) { throw new RuntimeException ( "Please manually set the font, or add some common fonts in the system" ) ; } return ff ; } return new Font ( name , style , size ) ; }
获得指定字体

@param name
字体名称
@param style
字体样式 支持：Font.PLAIN Font.BOLD Font.ITALIC
@param size
字体大小
@return 字体
获得指定字体