code: public static void setFont(Font font, PropertyOwner propertyOwner, Map<String,Object> properties)
      {
          if (font != null)
          {
              ScreenUtil.setProperty(ScreenUtil.FONT_SIZE, Integer.toString(font.getSize()), propertyOwner,  properties);
              ScreenUtil.setProperty(ScreenUtil.FONT_STYLE, Integer.toString(font.getStyle()), propertyOwner,  properties);
              ScreenUtil.setProperty(ScreenUtil.FONT_NAME, font.getName(), propertyOwner,  properties);
          }
          else
          {
              ScreenUtil.setProperty(ScreenUtil.FONT_SIZE, null, propertyOwner,  properties);
              ScreenUtil.setProperty(ScreenUtil.FONT_STYLE, null, propertyOwner,  properties);
              ScreenUtil.setProperty(ScreenUtil.FONT_NAME, null, propertyOwner,  properties);
          }
      }
docs: Encode and set the font info.
  (Utility method).
  Font is saved in three properties (font.fontname, font.size, font.style).
  @param The registered font.