diff --git a/cocos2d/core/label/CCSGLabel.js b/cocos2d/core/label/CCSGLabel.js index 7c5b32ec43..1b30b0e43d 100644 --- a/cocos2d/core/label/CCSGLabel.js +++ b/cocos2d/core/label/CCSGLabel.js @@ -490,13 +490,23 @@ _ccsg.Label = _ccsg.Node.extend({ _loadTTFFont: function(fontHandle) { var self = this; - - var fontFamilyName = cc.CustomFontLoader._getFontFamily(fontHandle); var callback = function () { self._notifyLabelSkinDirty(); self.emit('load'); }; - cc.CustomFontLoader.loadTTF(fontHandle, callback); + + var fontFamilyName = ""; + if (CC_WECHATGAME) { + fontFamilyName = wx.loadFont(fontHandle); + //avoid the error in wechat devtool platform + if (!fontFamilyName) { + fontFamilyName = cc.CustomFontLoader._getFontFamily(fontHandle); + } + callback(); + } else { + fontFamilyName = cc.CustomFontLoader._getFontFamily(fontHandle); + cc.CustomFontLoader.loadTTF(fontHandle, callback); + } return fontFamilyName; }, diff --git a/cocos2d/particle/CCSGParticleSystem.js b/cocos2d/particle/CCSGParticleSystem.js index 46cb048a2a..69687b1a15 100644 --- a/cocos2d/particle/CCSGParticleSystem.js +++ b/cocos2d/particle/CCSGParticleSystem.js @@ -349,6 +349,7 @@ _ccsg.ParticleSystem = _ccsg.Node.extend({ this.scheduleUpdateWithPriority(1); _ccsg.Node.prototype.onEnter.call(this); }, + /** * This is a hack function for performance, it's only available on Canvas mode.
* It's very expensive to change color on Canvas mode, so if set it to true, particle system will ignore the changing color operation.