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

Unsupported character : error thrown #265

Open
danbraik opened this issue Oct 1, 2021 · 1 comment · May be fixed by #352
Open

Unsupported character : error thrown #265

danbraik opened this issue Oct 1, 2021 · 1 comment · May be fixed by #352

Comments

@danbraik
Copy link

danbraik commented Oct 1, 2021

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
Copy link
Contributor

Pomax commented Oct 1, 2021

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)

@luizfilipe luizfilipe linked a pull request Nov 1, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants