I've been struggling with solving an issue regarding Overlays (I know its old but I don't have a choice for now).
The problem arises when I try to calculate the size of a string, when using a specific font, to align the string.

I noticed that it always ends up the same as the font size, i.e. the getGlyphAspectRatio was always 1. While doing something completely unrelated I noticed that if I "reloaded" the overlay object it suddenly worked as intended!
So looking into the code I find:

So it seems that the first time I attempt to use the Font it has not finished/loaded properly (since it returns null for some characters) but then after that works fine?
Am I loading the font incorrectly?

It's been a while since I wrote the above code so I wouldn't be surprised to find I missed something and can't remember it now.
Looked for this issue on the forum, the log message seems to be quite common but could not find an example of this specific issue.

Thanks for reading!

Last edited by gabbsson on Wed Jun 12, 2019 6:23 pm, edited 1 time in total.