Fix strike-though bug, when line would be drawn at the wrong position.

This commit is contained in:
kangax 2011-02-13 15:27:04 -05:00
parent ef425d18c5
commit ff1bfece6d

View file

@ -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();