You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this trying to make a font stack with Arial Unicode MS as a fallback using the demo site (https://maplibre.org/font-maker/). The error in the console is:
sdfglyph.js:1646 Cannot enlarge memory arrays to size 28626944 bytes (OOM). Either (1) compile with -s INITIAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0
I think just adding -s ALLOW_MEMORY_GROWTH=1 to build_wasm.sh should be an easy fix.
I ended up just running font-maker from the command line to make the font stack, which seems to have worked without a hitch.
Awesome tool, by the way! It made me very happy to find this.
Attachments
Include the font file (.ttf or .otf) you are trying to convert.
It does get rid of the error with the Arial Unicode font but the WASM version is really slow compared to the command line (which still takes a long time rendering most of the BMP with one thread).
This is related to some potential tasks that came up in maplibre/maplibre#154 for building a reproducible fallback based on Noto. I'll open a separate issue for that.
How to reproduce
I ran into this trying to make a font stack with Arial Unicode MS as a fallback using the demo site (https://maplibre.org/font-maker/). The error in the console is:
I think just adding
-s ALLOW_MEMORY_GROWTH=1
tobuild_wasm.sh
should be an easy fix.I ended up just running
font-maker
from the command line to make the font stack, which seems to have worked without a hitch.Awesome tool, by the way! It made me very happy to find this.
Attachments
Arial Unicode.ttf.zip
The text was updated successfully, but these errors were encountered: