final String STYLE_EL_ID = "__rstudio_normal_size";
Element oldStyle = document.getElementById(STYLE_EL_ID);
StyleElement style = document.createStyleElement();
style.setAttribute("type", "text/css");
style.setInnerText("." + styles.normalSize() + ", " +
"." + styles.normalSize() + " td, " +
"." + styles.normalSize() + " pre" +
" {font-size:" + size + "pt !important;}");
document.getBody().appendChild(style);
if (oldStyle != null)
oldStyle.removeFromParent();
style.setId(STYLE_EL_ID);
}