protected Font createFont(RenderingContext ctx, Font root_font, float size, IdentValue weight, IdentValue style, IdentValue variant) {
protected static Font createFont(RenderingContext ctx, Font root_font, float size, IdentValue weight, IdentValue style, IdentValue variant) {
    protected Font createFont(RenderingContext ctx, Font root_font, float size, IdentValue weight, IdentValue style, IdentValue variant) {        //Uu.p("creating font: " + root_font + " size = " + size +        //    " weight = " + weight + " style = " + style + " variant = " + variant);        int font_const = Font.PLAIN;        if (weight != null &&                (weight == IdentValue.BOLD ||                weight == IdentValue.FONT_WEIGHT_700 ||                weight == IdentValue.FONT_WEIGHT_800 ||                weight == IdentValue.FONT_WEIGHT_900)) {            font_const = font_const | Font.BOLD;        }        if (style != null && (style == IdentValue.ITALIC || style == IdentValue.OBLIQUE)) {            font_const = font_const | Font.ITALIC;        }        // scale vs font scale value too        size *= ctx.getTextRenderer().getFontScale();        Font fnt = root_font.deriveFont(font_const, size);        if (variant != null) {            if (variant == IdentValue.SMALL_CAPS) {                fnt = fnt.deriveFont((float) (((float) fnt.getSize()) * 0.6));            }        }        return fnt;    }