Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not conrect in function 'function toUnicode(str)' #68

Open
peacess opened this issue Jan 26, 2024 · 0 comments
Open

not conrect in function 'function toUnicode(str)' #68

peacess opened this issue Jan 26, 2024 · 0 comments

Comments

@peacess
Copy link

peacess commented Jan 26, 2024

下面的代码运行不正常:
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
....
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant