Skip to content

Commit 65eaf27

Browse files
authored
Merge pull request #3520 from stnguyen/develop
Fix label stroke is rendered ugly on web platform
2 parents 8cc2b2e + b085736 commit 65eaf27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: cocos2d/core/labelttf/CCLabelTTFCanvasRenderCmd.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,10 @@ cc.LabelTTF._firsrEnglish = /^[a-zA-Z0-9\-¿¡«À-ÖØ-öø-ʯ\u0300-\u034e\u03
387387
var locStrLen = this._strings.length;
388388
for (var i = 0; i < locStrLen; i++) {
389389
var line = this._strings[i];
390-
if (locStrokeEnabled)
390+
if (locStrokeEnabled) {
391+
context.lineJoin = 'round';
391392
context.strokeText(line, xOffset, yOffsetArray[i]);
393+
}
392394
context.fillText(line, xOffset, yOffsetArray[i]);
393395
}
394396
cc.g_NumberOfDraws++;

0 commit comments

Comments
 (0)