not conrect in function 'function toUnicode(str)'
peacess opened this issue · comments
Peace commented
下面的代码运行不正常:
import FontCarrier from 'font-carrier';
const t = FontCarrier.transfer('t.ttf');
const s = '𠀀';
const newFont = t.min(s);
newFont.get(s) === undefined;
出错的原因在函中
function toUnicode(str) {
var uArray = []
var u = str2unicode(str)// 这一行不正确, 因为'𠀀'字符用utf-16时是4bytes,不是通常的2bytes
....
}