umanwizard / libeot

Library for parsing Embedded OpenType files (Microsoft embedded font "standard"), and converting them to other formats
Other
14 stars 6 forks source link

Couldn't allocate sufficient memory #7

Closed hongnk closed 5 months ago

hongnk commented 6 months ago

When built on MacOSX M1 (ARM), and tried a compressed .eot file, it resulted in "couldn't allocate sufficient memory". But it worked for non-compressed .eot file, so it must be something with the unpack function.

However standard build on Ubuntu had no problem for both .eot files.

And my aim is to build as wasm (using emscripten), but it produced the same memory error for compressed .eot when called in browser javascript (even on Ubuntu).

zip file contains sample compressed and uncompressed eot fonts.zip

umanwizard commented 6 months ago

Can you please share the font file that caused the issue On May 19, 2024, at 00:47, hongnk @.***> wrote: When built on MacOSX M1 (ARM), and tried a compressed .eot file, it resulted in "couldn't allocate sufficient memory". But it worked for non-compressed .eot file, so it must be something with the unpack function. However standard build on Ubuntu had no problem for both .eot files. And my aim is to build as wasm (using emscripten), but it produced the same memory error for compressed .eot when called in browser javascript (even on Ubuntu).

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

hongnk commented 6 months ago

Thanks for checking. Zip file contains sample compressed and uncompressed eot fonts.zip

umanwizard commented 6 months ago

Can you please describe exactly how you are building and running?

hongnk commented 6 months ago

Steps: git clone https://github.com/umanwizard/libeot cd libeot autoreconf --install ./configure make then call ./eot2ttf [compressed eot] [out ttf] see screenshot: image

umanwizard commented 6 months ago

Thank you for the help. I’ll investigate this soon.

hongnk commented 6 months ago

I have found that it is due to gcc -O2, changing it to gcc -O1 works on Mac. This ticket can close. Thank you!

umanwizard commented 5 months ago

I've pushed a commit that should fix the issue even with -O3 or -O2. Please try again with latest master.

hongnk commented 5 months ago

Thank you it works perfectly! O2 helps reduce file size by half (vs O1). I'll try to use O3 although it doesn't improve further.