mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-21 06:30:59 +00:00
Fix strike-though bug, when line would be drawn at the wrong position.
This commit is contained in:
parent
ef425d18c5
commit
ff1bfece6d
1 changed files with 6 additions and 1 deletions
|
|
@ -782,7 +782,6 @@ Cufon.registerEngine('canvas', (function() {
|
|||
|
||||
if (textDecoration.underline) line(-font.face['underline-position'], g.fillStyle);
|
||||
if (textDecoration.overline) line(font.ascent, g.fillStyle);
|
||||
if (textDecoration['line-through']) line(-font.descent, g.fillStyle);
|
||||
|
||||
function renderText() {
|
||||
if (isItalic) {
|
||||
|
|
@ -825,7 +824,13 @@ Cufon.registerEngine('canvas', (function() {
|
|||
}
|
||||
}
|
||||
|
||||
g.save();
|
||||
renderText();
|
||||
g.restore();
|
||||
|
||||
if (textDecoration['line-through']) {
|
||||
line(-font.descent, g.fillStyle);
|
||||
}
|
||||
|
||||
g.restore();
|
||||
g.restore();
|
||||
|
|
|
|||
Loading…
Reference in a new issue