Comments (8)
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?
from troika.
update my fonts file link: https://github.com/googlefonts/noto-cjk/raw/main/Serif/Variable/TTF/NotoSerifCJKsc-VF.ttf
from troika.
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.
from troika.
@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?
from troika.
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.
from troika.
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. 😓
from troika.
I believe I was getting this error from empty strings: ' '. Will have to circle back to confirm.
from troika.
Related Issues (20)
- Util function getCaretAtPoint can't get the uniform text caret vertical position for number/character and Chinese text. HOT 5
- Runtime error: 'webgl-sdf-generator' does not contain a default export (imported as 'createSDFGenerator'). HOT 3
- Emoji and Unicode support HOT 3
- Memory Issue with troika-three-text HOT 5
- troika-three-text: Indic shaping
- getCaretAtPoint(...) taking surrogate pairs into consideration HOT 2
- Support ligature caret positioning provided in font
- anchorY="bottom-baseline" not working since v0.48.0 HOT 2
- Glitches when used with Montserrat HOT 2
- Cloning a synced text still requires sync();
- [ Angular 17 ] - TS2307: Cannot find module 'troika-three-text' or its corresponding type declaratio HOT 1
- Apply GLSL shader to only some letters
- Fix netlify links in documentation
- Cannot set property customDepthMaterial of #<InstancedUniformsMesh> which has only a getter
- LinearEncoding was not found in 'three'
- troika-three-text: mesh.textRenderInfo missing lineHeight and other font metrics HOT 3
- troika-three-text: First line of text is missing "top" spacing HOT 10
- How to draw many instance of plan with same texture but with different uvs.
- troika-three-text: possible to use in a webworker? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from troika.