Skip to content

Commit aa6b57a

Browse files
committed
Add ttc loader and prevent the pure digital fonts is invalid
1 parent 27cfa04 commit aa6b57a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/core/platform/CCLoaders.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ cc._fontLoader = {
8888
},
8989
_loadFont : function(name, srcs, type){
9090
var doc = document, path = cc.path, TYPE = this.TYPE, fontStyle = cc.newElement("style");
91-
type = type.toLowerCase();
9291
fontStyle.type = "text/css";
9392
doc.body.appendChild(fontStyle);
9493

@@ -105,6 +104,7 @@ cc._fontLoader = {
105104
fontStr += (i === li - 1) ? ";" : ",";
106105
}
107106
}else{
107+
type = type.toLowerCase();
108108
fontStr += "url('" + srcs + "') format('" + TYPE[type] + "');";
109109
}
110110
fontStyle.textContent += fontStr + "}";

0 commit comments

Comments
 (0)