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

Cannot Dynamically Load CFF Fonts Freetype 2.6.3 #3

Open
maxabrams opened this issue Jun 24, 2016 · 3 comments
Open

Cannot Dynamically Load CFF Fonts Freetype 2.6.3 #3

maxabrams opened this issue Jun 24, 2016 · 3 comments

Comments

@maxabrams
Copy link

maxabrams commented Jun 24, 2016

Following every step on your wiki page, I cannot get a CFF font (such as Inconsolata.otf) to load on demand. It looks like emscripten has changed their default modules to include.

I've tried using the --use-preload-plugins flag, but it still gives an error on run time (Load_Char Error 164)

Are there any special flags or formats to load a CFF font? Any help would be appreciated.

A few errors I noticed:
--use-preload-plugin flag is required or Browser will be undefined
the function "_monochrome" also needs to be included in js compilation or the freetype.html will crash

@maxabrams
Copy link
Author

maxabrams commented Jun 24, 2016

Also tried with embedding and seemed to fail. Is this emscripten related or how the main function handles the loading of .otf chars?

@metafloor
Copy link
Owner

I ran into the same problem about a month ago and had to regress to freetype 2.4.4. Tracked the problem down to a 64-bit arithmetic issue with FT_DivFix() but have not been able to dedicate any more time to it. I just needed it to work and 2.4.4 was sufficient for my needs.

Some background:

emscripten-core/emscripten#4262

I just released a big change in bwip-js (which uses freetype), and will try to update the freetype notes soon....

@maxabrams
Copy link
Author

Thank you for the response and background information! This provides some great context to work with. I will try and look into the issue as well.

Congratulations on the release :)

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