mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-04 03:44:45 +00:00
Render IText correctly when only fontWeight or fontStyle changes
Fixes rendering of characters that only have the styles "fontWeight" and/or "fontStyle" set. Previously _hasStyleChanged() did not detect a change if only one of those two styles have been set.
This commit is contained in:
parent
0f2e306a64
commit
dda68b44dd
1 changed files with 4 additions and 0 deletions
|
|
@ -356,6 +356,8 @@
|
|||
textBackgroundColor: style && style.textBackgroundColor || this.textBackgroundColor,
|
||||
textDecoration: style && style.textDecoration || this.textDecoration,
|
||||
fontFamily: style && style.fontFamily || this.fontFamily,
|
||||
fontWeight: style && style.fontWeight || this.fontWeight,
|
||||
fontStyle: style && style.fontStyle || this.fontStyle,
|
||||
stroke: style && style.stroke || this.stroke,
|
||||
strokeWidth: style && style.strokeWidth || this.strokeWidth
|
||||
};
|
||||
|
|
@ -695,6 +697,8 @@
|
|||
prevStyle.textBackgroundColor !== thisStyle.textBackgroundColor ||
|
||||
prevStyle.textDecoration !== thisStyle.textDecoration ||
|
||||
prevStyle.fontFamily !== thisStyle.fontFamily ||
|
||||
prevStyle.fontWeight !== thisStyle.fontWeight ||
|
||||
prevStyle.fontStyle !== thisStyle.fontStyle ||
|
||||
prevStyle.stroke !== thisStyle.stroke ||
|
||||
prevStyle.strokeWidth !== thisStyle.strokeWidth
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue