code: public void registerFontMetrics(String name, Font font, float lineHeight) {
      HtmlFontMetrics metrics = getFontMetrics(font); // get emwidth via default measurement
      fontMetrics.put(font, new HtmlFontMetrics(font, lineHeight, metrics.emwidth));
    }
docs: Registers metrics for the specified font in the specified style and size. This overrides the
  default font metrics calculation (which is hacky and inaccurate). If you want to ensure
  somewhat consistent font layout across browsers, you should register font metrics for every
  combination of font, style and size that you use in your app.
  
  @param lineHeight the height of a line of text in the specified font (in pixels).