Issues Using Free Font With Sprite #1729
-
I'm trying to display changing numbers without flickering. Following this example and using NotoSans font worked:
However when trying to use free font, the following didn't work:
and
Is it possible to use free font with sprites? What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
I suspect if you use:
It will work. Since the text is printed in the sprite first, it is the sprite that needs to have the font loaded. I know this can get confusing... |
Beta Was this translation helpful? Give feedback.
-
Oh, yes I also tried |
Beta Was this translation helpful? Give feedback.
-
Ah, yes. I have just checked and printToSprite only works for smooth fonts! You can print a free font in a sprite that has already been created. Example here. |
Beta Was this translation helpful? Give feedback.
-
That works, thank you! It'll be great if printToSprite supports free fonts too. |
Beta Was this translation helpful? Give feedback.
-
I tend to add features to support my own projects and I got lazy when I added printToSprite. I will add to my (long) to do list! |
Beta Was this translation helpful? Give feedback.
Ah, yes. I have just checked and printToSprite only works for smooth fonts!
You can print a free font in a sprite that has already been created.
Example here.