非拉丁字符没有被正确地截断,所以我修改了fragmentText()函数以截断空白。档案载于:
"C:\CocosCreator\resources\engine\cocos2d\core\label\CCTextUtils.js“
fragmentText: function (stringToken, allWidth, maxWidth, measureText) {
return "function called";
}问题是,我看到Cocos Creator编辑器中的更改,并且文本按照我的需要被截断,但是我没有看到对浏览器有任何影响,因为函数从未被调用过。
为什么在构建时不调用该函数?
P.S:我使用Cocos Creator 1.10,但在C:\CocosCreator_2.1.1中也安装了2.1.1
发布于 2020-06-10 13:37:26
https://stackoverflow.com/questions/57979221
复制相似问题