Use removedStyles when checking for font-based variant.
This commit is contained in:
parent
e971f875d4
commit
87abfa1085
|
@ -1249,13 +1249,13 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
CHTMLgetVariant: function () {
|
CHTMLgetVariant: function () {
|
||||||
var values = this.getValues("mathvariant","fontfamily","fontweight","fontstyle");
|
var values = this.getValues("mathvariant","fontfamily","fontweight","fontstyle"), style;
|
||||||
values.hasVariant = this.Get("mathvariant",true); // null if not explicitly specified
|
values.hasVariant = this.Get("mathvariant",true); // null if not explicitly specified
|
||||||
if (this.style) {
|
if (this.removedStyles) {
|
||||||
var span = HTML.Element("span"); span.style.cssText = this.style;
|
style = this.removedStyles;
|
||||||
if (span.style.fontFamily) values.family = span.style.fontFamily;
|
if (style.fontFamily) values.family = style.fontFamily;
|
||||||
if (span.style.fontWeight) values.weight = span.style.fontWeight;
|
if (style.fontWeight) values.weight = style.fontWeight;
|
||||||
if (span.style.fontStyle) values.style = span.style.fontStyle;
|
if (style.fontStyle) values.style = style.fontStyle;
|
||||||
}
|
}
|
||||||
if (!values.hasVariant) {
|
if (!values.hasVariant) {
|
||||||
if (values.fontfamily) values.family = values.fontfamily;
|
if (values.fontfamily) values.family = values.fontfamily;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user