harfbuzz / harfbuzzjs

Providing HarfBuzz shaping library for client/server side JavaScript projects
https://harfbuzz.github.io/harfbuzzjs/
Other
204 stars 35 forks source link

fix: use `codePointAt` instead of `charCodeAt` #74

Closed yisibl closed 1 year ago

yisibl commented 1 year ago

@khaledhosny says:

charCodeAt gives UTF-16 code units (including surrogate pairs), you should use codePointAt instead. https://github.com/harfbuzz/harfbuzzjs/pull/73#pullrequestreview-1350232873