diff --git a/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js b/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js index 9a0ed54f7b..3902eb1402 100644 --- a/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js +++ b/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js @@ -288,8 +288,8 @@ } canvasSizeY = this._splitedStrings.length * this._getLineHeight(); - this._canvasSize.width = parseFloat(canvasSizeX.toFixed(2)) + 2 * this._getMargin(); - this._canvasSize.height = parseFloat(canvasSizeY.toFixed(2)); + this._canvasSize.width = Math.round(canvasSizeX.toFixed(2)) + 2 * this._getMargin(); + this._canvasSize.height = Math.round(canvasSizeY.toFixed(2)); if(node._isItalic) { //0.0174532925 = 3.141592653 / 180 this._canvasSize.width += node._drawFontsize * Math.tan(12 * 0.0174532925);