iOS document.fonts.onloadingdone() never returning

Hello all, I started down the wrong path in a different thread thinking that I had an issue loading custom fonts in iOS. That is not the case, and in fact I can load the fonts just fine

Turns out what I am seeing is that a call to

document.fonts.onloadingdone()

is never returning in iOS, while it does return in Android and Win. This call is necessary to delay calls to create the BABYLON.DynamicTexture for subsequent calls to drawText() until after custom fonts are known to have been loaded. Otherwise I get system font fallbacks in Android.

Any idea as to why the onloadingdone() call would complete in Android but not iOS? The fonts themselves actually do load, as I am able to use them in a div. Hence my confusion.

This looks like a Safari issue, you should try to ask on their bug tracker as the APIs for fontset should be supported.

1 Like

happens in Chrome as well if that modifies anything

Nah, is more likely to be an iOS (apple policies) related issues. @sebavan Do you know anyone specialized with this kind of problems. I tried to help but this is just beyond my expertise,

nope, the best would be to check on an Apple forum as it sounds like a question for them. Sorry to not be able to help more :frowning:

1 Like

no worries, thanks for taking the time to reply.