class AWTUtilities {

    public static String encode(Font font)
    {
        String style;
        if (font.isBold())
        {
            style = font.isItalic() ? "bolditalic" : "bold";
        }
        else
        {
            style = font.isItalic() ? "italic" : "plain";
        }
        return String.join("-", font.getName(), style, String.valueOf(font.getSize()));
    }

    private  AWTUtilities();

}