Unsupported character : error thrown
danbraik opened this issue · 1 comments
danbraik commented
Hello !
Calling this function with the library "pdfkit" and the font "Lora/Lora-VariableFont_wght.ttf"
content = "A´b"
this.doc
.font("ContentFont")
.text(
content,
0, 0
);
throw this error (which concerns your library)
2021-10-01 14:46:56.746 HAECProcess Main failed! TypeError: Cannot read property 'xCoordinate' of null
Par défaut
2021-10-01 14:46:56.746 HAEC at GPOSProcessor.getAnchor (/usr/src/app/node_modules/fontkit/index.js:10223:20)
Par défaut
2021-10-01 14:46:56.746 HAEC at GPOSProcessor.applyAnchor (/usr/src/app/node_modules/fontkit/index.js:10210:27)
Par défaut
2021-10-01 14:46:56.746 HAEC at GPOSProcessor.applyLookup (/usr/src/app/node_modules/fontkit/index.js:10106:16)
Par défaut
2021-10-01 14:46:56.746 HAEC at GPOSProcessor.applyLookups (/usr/src/app/node_modules/fontkit/index.js:7419:26)
Par défaut
2021-10-01 14:46:56.746 HAEC at GPOSProcessor.applyFeatures (/usr/src/app/node_modules/fontkit/index.js:7372:10)
Par défaut
2021-10-01 14:46:56.746 HAEC at GPOSProcessor.applyFeatures (/usr/src/app/node_modules/fontkit/index.js:10243:42)
Par défaut
2021-10-01 14:46:56.746 HAEC at ShapingPlan.process (/usr/src/app/node_modules/fontkit/index.js:6792:19)
Par défaut
2021-10-01 14:46:56.746 HAEC at OTLayoutEngine.position (/usr/src/app/node_modules/fontkit/index.js:10361:17)
Par défaut
2021-10-01 14:46:56.746 HAEC at LayoutEngine.position (/usr/src/app/node_modules/fontkit/index.js:10515:32)
Par défaut
2021-10-01 14:46:56.746 HAEC at LayoutEngine.layout (/usr/src/app/node_modules/fontkit/index.js:10487:10)
the cause of the error is that this little strange character " ´ " (known as U+00B4 : ACUTE ACCENT) is following a letter.
Thanks !
Pomax commented
Did you check whether that same thing happens using just fontkit, though? (it probably still crashes, but since this is the fontkit repo, showing purely fontkit code makes it more likely someone can help figure out what's going wrong)