Custom font for HTML load delay

16 views
Skip to first unread message

kal...@gmail.com

unread,
Dec 4, 2015, 10:42:33 AM12/4/15
to PlayN
I'm trying to use a custom (well, on non-windows systems) font in an HTML game being developed with PlayN. The problem is, I'm using the font immediately, but before it's loaded, the system automatically falls back on the default font, resulting in a mix of fonts in the game. Is there any way to see if the font is loaded before I start using it?

Thanks!

Andres Martinez Quijano

unread,
Dec 4, 2015, 10:54:13 AM12/4/15
to pl...@googlegroups.com
I solved it like this:

<div id="playn-root">
connecting...
<span style="font-family: Oxygen">.</span>
<span style="font-family: Monoxil">.</span>
</div>

Basically by writing something with the custom font, which if I
remember correctly would be loaded before the playn game
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "PlayN" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to playn+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

kal...@gmail.com

unread,
Dec 4, 2015, 1:35:05 PM12/4/15
to PlayN
Works perfectly, thank you! Things like this should be added to the documentation IMHO.

Michael Bayne

unread,
Dec 10, 2015, 1:25:16 PM12/10/15
to pl...@googlegroups.com
On Fri, Dec 4, 2015 at 10:35 AM, <kal...@gmail.com> wrote:
Works perfectly, thank you! Things like this should be added to the documentation IMHO.


along with a bunch more info on custom fonts.

Reply all
Reply to author
Forward
0 new messages