hubs
hubs copied to clipboard
Korean Characters for Name Tags
Is your feature request related to a problem? Please describe. We're building a metaverse platform using the hubs cloud.Currently, only English is allowed for the nicknames of the users, but we want Korean to be allowed as well. I don't know if I can customize or not to allow Korean.
Describe the solution you'd like I want to use a nickname in Korean.
Describe alternatives you've considered
Additional context
A recent change to text rendering makes this much easier to implement, but it requires Reticulum changes, which are outside of the supported Hubs Cloud. See also https://github.com/mozilla/hubs/issues/3934
I've implemented this in my client earlier this week (https://github.com/mozilla/hubs/pull/5463/files).
The only pitfall is jsonschema version in hubs is stale (no support of RegExp construction with unicode flag), thus causing the schema validation failed when a CJK name is used.
I've implemented this in my client earlier this week (https://github.com/mozilla/hubs/pull/5463/files).
The only pitfall is jsonschema version in hubs is stale thus not support RegExp construction with unicode flag, thus causing the schema validation failed when a CJK name is used.
Very nice! Do you have any problems with reticulum rejecting names? Maybe it is only room names that go through a RegEx in the backend.
It's possible we can dump all the RegEx checks now in both client and server. Do they still have a purpose?
I've implemented this in my client earlier this week (https://github.com/mozilla/hubs/pull/5463/files). The only pitfall is jsonschema version in hubs is stale thus not support RegExp construction with unicode flag, thus causing the schema validation failed when a CJK name is used.
Very nice! Do you have any problems with reticulum rejecting names? Maybe it is only room names that go through a RegEx in the backend.
It's possible we can dump all the RegEx checks now in both client and server. Do they still have a purpose?
We only allowed CJK characters in nickname. haven't tested room name yet.
I've implemented this in my client earlier this week (https://github.com/mozilla/hubs/pull/5463/files).
The only pitfall is jsonschema version in hubs is stale (no support of RegExp construction with unicode flag), thus causing the schema validation failed when a CJK name is used.
Can you share live project URL ? @wsxiaoys
Hello, I'll guide this issue.
- You must set
fontUrl.defaultintroika-text.js- https://github.com/belivvr/hubs/blob/113dfa307e8f75376860ccccb5ca4e9b09e14864/src/components/troika-text.js#L65
- Find
a-zand add가-힣in regexp
then you can use korean name.
Hello, I'll guide this issue.
You must set
fontUrl.defaultintroika-text.js
- https://github.com/belivvr/hubs/blob/113dfa307e8f75376860ccccb5ca4e9b09e14864/src/components/troika-text.js#L65
Find
a-zand add가-힣in regexpthen you can use korean name.
You will also need to add https://cdn.jsdelivr.net to the Extra Content Security Policy connect-src Rules section of your Hubs Cloud server settings.
This works well for supporting ASCII characters and the Korean alphabet, but it doesn't support extended latin characters (Sofía) or Chinese characters (张伟). What we really need is font fallback support.
reticulum config connect-src to add font url
config.toml
[ret."Elixir.RetWeb.Plugs.AddCSP"]
connect_src = "https://cdn.jsdelivr.net"