Thanks juj, I'll certainly check out the Fetch API.

Yes I am rendering font glyphs to a dynamic texture atlas (i.e. a bitmap) 
where my GL shaders can get at them. 

This for an experimental GUI application platform I've been working on for 
some years whereby, thanks to Emscripten, the web becomes just another 
compilation target alongside OSX, Windows, Android, iOS, etc. It depended 
on Freetype for a long time but I've recently beefed up the degree to which 
it uses native OS services for well-defined services such as rendering font 
glyphs, decoding pngs and jpegs, etc. 

I'm hoping to open it to public feedback early next year.

Thanks again,


Reuben

On Friday, December 22, 2017 at 1:20:24 PM UTC, jj wrote:
>
> 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] 
> <javascript:>>: 
> > 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.

Reply via email to