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

troika-three-text uncaught exception #313

Open
WallanceLee opened this issue May 22, 2024 · 8 comments
Open

troika-three-text uncaught exception #313

WallanceLee opened this issue May 22, 2024 · 8 comments

Comments

@WallanceLee
Copy link

Error: Error in worker callModule call: Cannot destructure property 'ascender' of 'fontObj' as it is undefined.
Why was it happened? Could you provide some listener to receive this exception stacktrace. I want to trace the source parameter, but I cannot found. Thanks a lot for your time.

@WallanceLee
Copy link
Author

sorry, I found the solution. If I use default font, there was not the problem, but If I use NotoSerifCJKsc-VF.ttf from google noto repo or other font like Songti, there is the problem. The problem may be with CJK languages, because when I render just ASCII-ranged chars there was not the problem. Could you give me some help?

@WallanceLee
Copy link
Author

@iangilman
Copy link

I'm getting the same thing. It does appear to be related to specific fonts. In my case the fonts aren't CJK-related. I haven't tracked down exactly which fonts I'm using that are causing the issue; I can if that's helpful.

@lojjic
Copy link
Collaborator

lojjic commented May 31, 2024

@WallanceLee I just tried a local test using your NotoSerifCJKsc-VF.ttf font link and some Chinese text and it renders just fine for me. 🤔

That Cannot destructure property 'ascender' of 'fontObj' error seems like it could only happen if certain characters could not be resolved to a font, which shouldn't ever happen. There may be some sort of fallback bug with certain characters. Can you provide a string of text that definitely triggers the error for you?

@WallanceLee
Copy link
Author

What if some unicode is not present in font file? For example, \uE532? Sorry, I cannot find the exact character because my CAD file has a lot of character.

@lojjic
Copy link
Collaborator

lojjic commented Jun 4, 2024

Any unicode codepoint that can not be resolved in the font file you specify or one of the unicode fonts should just fall back to the null glyph (a rectangle).

I'm not sure how to reproduce this if you can't provide a string that fails. 😓

@null77
Copy link

null77 commented Jul 3, 2024

I believe I was getting this error from empty strings: ' '. Will have to circle back to confirm.

@steoo
Copy link

steoo commented Aug 1, 2024

I'm getting the same error from the empty strings

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

5 participants