if (isDefaultFontFromComponent()) {
CalculatedStyle style = root.getStyle();
PropertyValue fontFamilyProp = new PropertyValue(CSSPrimitiveValue.CSS_STRING, getFont().getFamily(),
getFont().getFamily());
fontFamilyProp.setStringArrayValue(new String[] { fontFamilyProp.getStringValue() });
style.setDefaultValue(CSSName.FONT_FAMILY, new StringValue(CSSName.FONT_FAMILY, fontFamilyProp));
style.setDefaultValue(CSSName.FONT_SIZE, new LengthValue(style, CSSName.FONT_SIZE,
new PropertyValue(CSSPrimitiveValue.CSS_PX, getFont().getSize(), Integer
.toString(getFont().getSize()))));
Color c = getForeground();
style.setDefaultValue(CSSName.COLOR, new ColorValue(CSSName.COLOR,