public void registerFontMetrics(String name,Font font,float lineHeight){
  HtmlFontMetrics metrics=getFontMetrics(font);
  fontMetrics.put(font,new HtmlFontMetrics(font,lineHeight,metrics.emwidth));
}

public void registerFontMetrics ( String name , Font font , float lineHeight ) { HtmlFontMetrics metrics = getFontMetrics ( font ) ; fontMetrics . put ( font , new HtmlFontMetrics ( font , lineHeight , metrics . emwidth ) ) ; }
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 .
