cocos-js 取到bmfont里包含的字符

//获取BM FONT里面字符
getBMFontChars: function (fntPath) { 
    var ret = [];
    var fntRes = cc.loader.getRes(fntPath);
    if (fntRes && fntRes.hasOwnProperty("fontDefDictionary")) {
        for (var key in fntRes['fontDefDictionary']) {
            key = String.fromCharCode(Number(key))
            ret.push(key)
        }
    } 
    return ret;
}

存一下,cocos-js 取到bmfont里包含的字符
["\t"," “,”!",""","#","$","%","&","’","(",")","*","+",",","-",".","/",“0”,“1”,“2”,“3”,“4”,“5”,“6”,“7”,“8”,“9”,":",";","<","=",">","?","@","[","\","]","^","_","`","{","|","}","~"]