You could look into Emscripten Fetch API to just do XHRs of those URLs (or emscripten_async_wget()), that's the natural way to download URLs. Although base64 embedding is certainly an option (at the expense of increased size) if you want to contain the file.
I suppose you're writing something like https://github.com/juj/tiny_chess/blob/master/src/library_unicode.js to replace FreeType? I.e. render font glyphs to raster images without compiling in FreeType built-in? 2017-12-22 12:27 GMT+02:00 Reuben Scratton <[email protected]>: > Answering my own question, managed to solve it by base64-encoding the font > asset and using that in a data: URI. > > All part of a larger effort to avoid the need for Freetype in Javascript... > > > > On Thursday, December 21, 2017 at 5:14:10 PM UTC, Reuben Scratton wrote: >> >> Is it possible for a --preload-file asset to be referred to by URL at >> runtime? >> >> What I'm specifically after is to use CSS's @font-face property to refer >> to preloaded custom font files. >> > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
