Skip to content
This repository was archived by the owner on Dec 15, 2020. It is now read-only.
This repository was archived by the owner on Dec 15, 2020. It is now read-only.

[Question] How can I use UTF-8? #52

Open

Description

I added at my index.html

but i can not see Korean character set.

how can i use UTF-8?

Activity

  1. self-assigned this
    on Feb 10, 2017
  2. amberroy commented on Feb 10, 2017

    @amberroy
    Contributor

    We haven't done much testing with UTF-8 thanks for bringing it to our attention, will take a look.

  3. andrewimm commented on Feb 13, 2017

    @andrewimm
    Contributor

    The way React VR renders text is through a technique known as Signed Distance Function fonts. It allows us to smoothly render text at any size, without pixelation. One downside is that the technique requires us to pre-render font glyphs before shipping them. The default glyphs set contains Roman and Cyrillic characters, but nothing beyond that.

    From Oculus's work with Samsung, we do do have SDF fonts for Korean glyphs. I'll add documentation for how to use custom font sets, and see if we can include those fonts in the next release of the ovrui npm package.

  4. andrewimm commented on Mar 24, 2017

    @andrewimm
    Contributor

    FYI documentation on how fonts are handled has been updated here: https://facebook.github.io/react-vr/docs/fonts.html

  5. LiuC520 commented on Apr 1, 2017

    @LiuC520

    The same to me ,I can't use chinese in Text node.
    I've alreay translate your website into chinese using react ,the website is www.vr-react.com

  6. Ninerian commented on Apr 1, 2017

    @Ninerian
  7. andrewimm commented on Apr 1, 2017

    @andrewimm
    Contributor

    Again, here's a link to the documentation describing how to use the included Japanese and Korean font sets, and how to make your own custom fonts: https://facebook.github.io/react-vr/docs/fonts.html

  8. mikearmstrong001 commented on Apr 22, 2017

    @mikearmstrong001
    Contributor

    Fallback font sets have been added to react vr and the docs have been updated again.

    Fallback fonts allow to support the full font set and the cost of extra download. There is no reason why mono emoji characters can't be supported with this.

    the fonts can't be found in the OVRUI repo
    https://github.com/OculusVR/ovrui/tree/master/fonts

  9. darknoon commented on Apr 24, 2017

    @darknoon

    Hey, I kind of understand how this came about, but couldn't we generate the SDFs dynamically when the user needs them based on the fonts they have installed?

    In my mind it's pretty regressive to think that users only communicate in one character set or another per-user or per-app. In my facebook feed I have english, arabic, icelandic, turkish, chinese, and japanese characters regularly. Not to mention that real communication in 2017 has tons of emoji.

  10. andrewimm commented on Apr 24, 2017

    @andrewimm
    Contributor

    @darknoon It would be great if we could achieve that, but there are a few technical limitations standing in our way:

    1. Access to the font itself — I've worked on a number of pdf-in-browser and similar document renderers, as well as JS tools to build and manipulate TTF and OTF fonts. The browser lets us render content with fonts, and in some cases get metadata about characters in fonts, but we never have access to the raw font data itself, which would be needed for an optimal SDF generator. Without that, we're never going to be fast.

    2. Generating the full set of fonts is prohibitively slow in the current state of things — even if we had full access to the underlying parametric data of the glyphs, we'd still need to spend time generating the proper metadata, which would likely hurt your application's time-to-interaction.

    3. Not all fonts want to be SDF-rendered. The font face we provide is designed to scale nicely with SDF techniques. If you did that with arbitrary fonts found on your computer, you would find that certain angles and curves don't preserve when rendered through the SDF technique.

    As Mike mentions above, we're now capable of chaining fallback fonts together, so you can support EFIGS + JK out of the box, as well as any other font faces you wish to generate on your own. We think that's a good step in i18n support while we actively explore other generation techniques. I do look forward to being able to support emoji myself!

  11. liyuechun commented on May 8, 2017

    @liyuechun
  12. RadValentin commented on Jul 1, 2017

    @RadValentin

    Could the fonts be published as part of the ovrui package or inside a new one? I don't like the ideea of copy-pasting them into my project. It would be cool if I could load them directly from node_modules.

    OVRUI.loadFont(
      '../node_modules/ovrui/fonts/japanese.fnt', 
      '../node_modules/ovrui/fonts/japanese.png'
    );
  13. andrewimm commented on Jul 3, 2017

    @andrewimm
    Contributor

    @RadValentin we used to do that, but intentionally removed them.
    It's convenient to write that during development, but your final production build won't have a node_modules folder! This created repeated confusion for developers who were linking into the npm package to fetch their font files, and not able to find the file when deploying to servers, so we removed them.

  14. genievn commented on Jul 10, 2018

    @genievn

    Hi,
    I've just realized Vietnamese is not supported too, any solution yet?

  15. andrewimm commented on Jul 10, 2018

    @andrewimm
    Contributor

    @genievn the text rendering pipeline is currently being overhauled to allow use of all system fonts

  16. jcyh0120 commented on Mar 2, 2019

    @jcyh0120

    any solutions yet? I would like to use Chinese text words.

  17. oussj commented on Nov 2, 2020

    @oussj

    Hello @andrewimm

    The link provided to use custom fonts is not working anymore (legacy react vr doc). I can't find anything in the react 360 documentation. Is there still a way to use custom fonts in react 360 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions