-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
Describe the example you'd like
I'd like to showcase our text layout feature that supports proper unicode layout, e.g. for RTL languages.
I think having a "localisation" example is a good way to do it.
It could either be in a "game menu" with the different buttons, but as a layout example, it may be too small.
Some notes/ideas:
- Use .appmanifest to enable the font layout feature
In example:
- Choose localization (english, arabic, ...) via some in game button
- add the extra font for arabic if selected. And remove it if deselected:
- See
font.add_font()/font.remove_font()
- See
- Get the localized text (e.g. lorem ipsum)
- E.g. load from disk
- See the text change (LTR, RTL) on screen
Note, the font.add_font() creates the font on-the-fly, so it may cause a delay in game. It would be good to experiment with loading the font + text_<language>.json from within a collection proxy, and then "hook up" the original font collection with the new font.
Lorem ipsum for different languages:
- English - lipsum.com
- Arabic - https://ar.lipsum.com/
- Portuguese - https://pt.lipsum.com/
- Japanese - https://generator.lorem-ipsum.info/_japanese
paweljarosz