playcanvas / playcanvas/engine
Be able for text element to use localised font without setting a key
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
Project: https://playcanvas.com/editor/scene/1230709

The font have been setup as the following:

It is common for a text element to just be numbers set from code. At the moment there is no way to set a text element to use the localised font (fr-FR in this case) without setting a key id.
The workaround is to set a random key id (or a key id that is mapped to " ") so that a localised font asset is used.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin by tracing the text element's localized-font selection in the engine source; the issue names no file or test entry point. Reproduce the linked editor scene and compare numeric or code-set text with the current random-key workaround. The work is complete when such text uses the locale's font without requiring a key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- localization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100