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
FreeType FT_DivFix() wrong result #4262
Comments
Can you add this to the freetype test in |
One problem is the test suite is running against freetype 2.4.4 I have verified that freetype 2.4.4 compiles and works correctly with the latest emscripten on linux x64. freetype 2.5+ compiles but fails to render any character because FT_DivFix() always returns 0. I don't think a new test case is needed; just upgrade freetype to current 2.6.3 and the existing test case should fail. |
Ok, I see. If you or someone else wants to make a PR with an update of freetype, that sounds like the next step here, and then we can debug on that PR. |
Another option might be to make the test suite use freetype from ports, as the version there looks like 2.6. The PR could remove freetype in the emscripten repo, and use the ports one instead. Should be examples of using zlib from ports in the test suite. |
Btw, were you trying on ports? It might have fixes that are necessary. |
This bug persists with current versions of both. Results in CFF fonts being unusable. |
Ok, then the next steps sounds like what was suggested a few comments back: a PR that moves the test suite to use freetype from ports, and shows the bug clearly. |
Edited to below -- More details can be found from Metafloor's wiki: https://github.com/metafloor/bwip-js/wiki/Compiling-FreeType |
No special access is needed to make a PR. You need a fork of this repo, to create a branch there, and to open a PR for that in this repo. |
PR created #4419 |
Additional information: http://savannah.nongnu.org/bugs/?48309 Seems to be coming from 64 bit division |
If it's indeed a 64-bit division issue, then we should create a standalone testcase of just that |
This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant. |
I have successfully compiled freetype in the past with older versions of freetype and emscripten. Upgraded to the latest version of each. Compiles without issue but I am getting a nonsense math result from within freetype.
Here is the problem code (freetype-2.6.3/src/cff/cf2ft.c line 73):
The output from the printf()s show:
The result of FT_DivFix(a,b) should be: a * 0x10000 / b, which for the given values is 131072.
I have tried compiling with different levels of optimization with no luck.
Platform: 4.2.0-16-generic #19-Ubuntu SMP x86_64
Thanks!
The text was updated successfully, but these errors were encountered: