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

no "unitsPerEm" #32

Open
kelvinwop opened this issue Feb 6, 2024 · 2 comments
Open

no "unitsPerEm" #32

kelvinwop opened this issue Feb 6, 2024 · 2 comments

Comments

@kelvinwop
Copy link

18dbc473-e0ee-4a46-be7d-32356ec82272:35 Failure loading font http://localhost:3000/fonts/RobotoMonoBold.json; trying fallback TypeError: Cannot read properties of undefined (reading 'unitsPerEm')

@isaackogan
Copy link

same issue

@siadou
Copy link

siadou commented Nov 21, 2024

If you are using r3f, its no need to convert to json type font, you can use ttf or other file type. for example:

      <Text font={'/fonts/PangMenZhengDaoBiaoTiTiMianFeiBan-2.ttf'} rotation={[-Math.PI / 3, 0, 0  ]} position={[PLANE_WIDTH / 2 - 20 , PHYS_Y + 2, PLANE_HEIGHT / 2 - 5 ]} fontSize={5} color="#fff">123</Text>

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

3 participants