Random missing letters when using custom font

Struggling with some strange behavior…

I’m creating a newText object, using a custom font “Print Clearly”, and the last character is just missing for some combinations.  If i insert “th” into the object the “h” doesnt show.  But “sh” and “ch” show just fine.  If i enlarge the object to a super large fontsize suddenly “th” shows up.  Also if i change the font to Arial it shows as well.  This is in the simulator on Windows. 

I really need to have this answer something I can copy and paste.  It’s really a frequently asked question…  :slight_smile:

Corona SDK uses the operating system’s native font rendering to generate an image that we use as an OpenGL texture.  Because of this, every operating system renders text a little bit differently.  Next, not all fonts are created equally.  Font’s like Arial and Helvetica are very well tested and come from professional font foundries.  Font’s you find on the Internet are not well tested and may have errors including problems with their metrics.

Your solutions:

1.  Try a different font.

2.  If it’s a single line, try adding spaces to the beginning and end if you’re loosing stuff on the left/right edges.  You can also set a “width” to make the image box returned to be bigger…

  1. If you’re loosing the top/bottom of images, you can go into Multi-line mode and add blank lines at the top and bottom.

Rob 

Thanks a lot Rob!

I really need to have this answer something I can copy and paste.  It’s really a frequently asked question…  :slight_smile:

Corona SDK uses the operating system’s native font rendering to generate an image that we use as an OpenGL texture.  Because of this, every operating system renders text a little bit differently.  Next, not all fonts are created equally.  Font’s like Arial and Helvetica are very well tested and come from professional font foundries.  Font’s you find on the Internet are not well tested and may have errors including problems with their metrics.

Your solutions:

1.  Try a different font.

2.  If it’s a single line, try adding spaces to the beginning and end if you’re loosing stuff on the left/right edges.  You can also set a “width” to make the image box returned to be bigger…

  1. If you’re loosing the top/bottom of images, you can go into Multi-line mode and add blank lines at the top and bottom.

Rob 

Thanks a lot Rob!