public static String getHtmlStyle(String additionalStyleInfo) {
return getHtmlStyle(additionalStyleInfo, null);
}
public static String getHtmlStyle(String additionalStyleInfo, Color bg) {
Font font = DcSettings.getFont(DcRepository.Settings.stSystemFontNormal);
Color color = ComponentFactory.getCurrentForegroundColor();
String foreground = Utilities.getHexColor(color);
String fontstyle = "";
if (font.isItalic())
fontstyle = ";font-style:italic";
else if (font.isBold())
fontstyle = ";font-weigth:bolder";
StringBuffer sb = new StringBuffer();
sb.append("style=\"");
sb.append("font-family:");
sb.append(font.getFamily());
sb.append(";font-size:");
sb.append(font.getSize());
sb.append(fontstyle);
if (bg != null) {
String background = Utilities.getHexColor(bg);
sb.append(";background:");