FreeType function table messed up.

57 views
Skip to first unread message

Max Savenkov

unread,
May 1, 2014, 7:22:53 AM5/1/14
to emscripte...@googlegroups.com
I have compiled FreeType into JavaScript using vs-tool/Visual Studio 2010, and linked my program with it. But during runtime, in one of the calls inside library, functions table seems to be messed up - instead of proper FreeType function, unrelated function from another library gets called. It seems that this is a linking problem. How do I debug this?

My current setup is as follows:
1) Compile FreeType 2.5.3 in Visual Studio 2010, producing libfreetype.bc, rename it to libfreetype.so to satisfy CMake
2) Compile Allegro library, which uses FreeType (liballegro_monolith-debug.so)
3) Compile my project, spefiying -lallegro_monolith-debug and -lfreetype

I'm using Emscripten SDK v1.16.0. Most of FreeType works, surprisingly, but because this single call gone awry, I'm can't specify fonts size - FreeType renders them all in default size :)

Jukka Jylänki

unread,
May 1, 2014, 7:47:52 AM5/1/14
to emscripte...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

MaxEd

unread,
May 5, 2014, 2:40:59 AM5/5/14
to emscripte...@googlegroups.com
Yes, that did help, thank you! Unfortunately, it seems like this patch hasn't made it into FreeType 2.5.3 at least, and it is no longer correct in two places.
For anyone who has to apply it by hand to 2.5.3 version, here's what needs to be changed:

1) cid_parse_font_matrix now has two more places where error value is returned. Since this function actually needs to be void, you'll have to change them to "return;" too.
2) af_dummy_hints_apply, the 3rd param no longer has type AF_ScriptMetrics, but rather AF_StyleMetrics.


01.05.2014 15:47, Jukka Jylänki пишет:
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/icfSTGz_dCg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages