mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-17 10:01:08 +00:00
fixed text underline/overline/linethrough not ignoring charSpacing at the end of line (#5006) (#5007)
This commit is contained in:
parent
c7607c8d16
commit
b1c25a4f56
1 changed files with 3 additions and 2 deletions
|
|
@ -1138,7 +1138,8 @@
|
|||
leftOffset = this._getLeftOffset(),
|
||||
topOffset = this._getTopOffset(), top,
|
||||
boxStart, boxWidth, charBox, currentDecoration,
|
||||
maxHeight, currentFill, lastFill;
|
||||
maxHeight, currentFill, lastFill,
|
||||
charSpacing = this._getWidthOfCharSpacing();
|
||||
|
||||
for (var i = 0, len = this._textLines.length; i < len; i++) {
|
||||
heightOfLine = this.getHeightOfLine(i);
|
||||
|
|
@ -1186,7 +1187,7 @@
|
|||
currentDecoration && currentFill && ctx.fillRect(
|
||||
leftOffset + lineLeftOffset + boxStart,
|
||||
top + this.offsets[type] * size + dy,
|
||||
boxWidth,
|
||||
boxWidth - charSpacing,
|
||||
this.fontSize / 15
|
||||
);
|
||||
topOffset += heightOfLine;
|
||||
|
|
|
|||
Loading…
Reference in a new issue