question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support multiple pages with text component

See original GitHub issue

Currently the text component supports only a single texture page. For chinese characters, even the most common ~1000 characters require 40 texture pages using an msdf bmfont generator.

Related: https://github.com/aframevr/aframe/blob/master/src/components/text.js#L209-L211

Here is a zip with what should be the most common 1000 characters, in the Microsoft YaHei font:

yahei.zip

npm install -g msdf-bmfont-xml

# simple test
msdf-bmfont -f json yahei/yahei.ttf -i yahei/charset-test.txt --pot --square

# 1000 characters
msdf-bmfont -f json yahei/yahei.ttf -i yahei/charset-1000.txt --pot --square

Related: https://github.com/aframevr/aframe/issues/3343

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
donmccurdycommented, Feb 11, 2018

I’ve put together a little web tool for generating these MSDF fonts. It will support special characters correctly, and you can provide your own fonts if you wish.

http://msdf-bmfont.donmccurdy.com/

^note, this requires the negate: false setting on A-Frame’s text component, which is only available on the master branch and will be released with 0.8.0.

1reaction
donmccurdycommented, Jan 26, 2018

As long as I keep the charset small, this method does work:

screen shot 2018-01-25 at 7 46 54 pm

Should also point out that those 1000 characters are 2.4 MB in this format, so users may still need to generate these fonts specially for each scene unfortunately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating multiple pages with navigation menus - W3C Wiki
In this article of the Web Standards Curriculum we'll talk about web site navigation and menus. You'll learn about different types of menus...
Read more >
Handling multiple pages with the external component React ...
component : Receives the component you want to use as a page. path : The browser's route that will allow users to navigate...
Read more >
How To create multiple pages dynamically when text does not ...
Forum Thread - How To create multiple pages dynamically when text does not fit in first page - ASP.NET Core - EJ 2....
Read more >
Create a Multi-page Website with React in 5 Minutes
In this article, we will discuss the steps for creating a multi-page website using React in 5 minutes using the React router v6....
Read more >
Single point of edit for same component on multiple pages
Hi all, i am working on a design for a webpage, where the website menu is visible on multiple pages in the adobe...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found