Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error for font #1

Open
cor-rine opened this issue Apr 14, 2017 · 2 comments
Open

Parsing error for font #1

cor-rine opened this issue Apr 14, 2017 · 2 comments

Comments

@cor-rine
Copy link

cor-rine commented Apr 14, 2017

Hi @mattdesl - I'm receiving the following error when requiring my font-file and trying to load it into my scene:

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Parsing file /[...]/webgl-experiments/assets/fonts/[font].ttf: Unexpected character '

Is this what you mean in your notes by "fails with some fonts" or "is not yet very stable or well-tested"? Any ideas on how I can get passed this for now?

Thanks!

@cor-rine
Copy link
Author

Ah - so update on this. It works with your files from fontpath-test-fonts - so it's likely a problem with the ttf/otf I'm trying to use. Even still though, if this experiment fares well for me, I will need to work on getting my font into the page, and would love your help if at all possible.

@formula1
Copy link

formula1 commented Aug 5, 2017

You may have figured it out already but it seems like the fonts from fontpath-test-fonts are already parsed json files. If you'd like to parse an "in the wild" ttf, it looks like you will want to parse it with fontpath. However, it seems like that is a wrapper around freetype2 which is a wrapper around a native library.

opentype looks to be a JS solution however I'm not entirely confident on its compatibility with fontpath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants