Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Custom font not available for French Android user.
Started by pgyore Jan 10 2019 09:27 AM

14 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

pgyore

[GLOBAL: userInfoPane.html]
pgyore
  • Observer

  • 9 posts
  • Corona SDK

I have a French tester who does not see my custom font during runtime, but USA users do see the font with no problem.

 

The font is a True Type, and is in the project root directory and called by it's file name in code, per documentation.

 

If anyone knows what can be done to remedy this, please let me know.

 

 

 

Thank you very much,

PG



[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 582 posts
  • Corona SDK

Some code would certainly be helpful. For instance, what is the difference between a French and a US user? How does one's nationality affect the way that you load the fonts, do you load a font based on device language or something, and if so, then how do you load them? Are there special strings or translations?



[TOPIC: post.html]
#3

pgyore

[GLOBAL: userInfoPane.html]
pgyore
  • Observer

  • 9 posts
  • Corona SDK

The app is English only. I do not include any unique code or considerations for other languages.

 

I basically have display objects with an attribute of:

 

font = "lcd.ttf"



[TOPIC: post.html]
#4

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,009 posts
  • Corona SDK

I like this thread because it is the most bizarre issue I have read in a while. It is like a murder scene. So let me get this straight.

 

1. All the words are in English.

2. You are not doing any localization. 

3. When somebody with a "French Phone" opens your app they don't see the text?

 

Is this tester using the same type of device? Can it be a typo with the font name? Lowercase/uppercase issue?



[TOPIC: post.html]
#5

pgyore

[GLOBAL: userInfoPane.html]
pgyore
  • Observer

  • 9 posts
  • Corona SDK

Thank you for the interest and forensic abilities..

 

- Yes, all the words are in English.

- Yes, I am doing no localization whatsoever.

- Yes, when somebody with a French Phone opens my app the do see text, but it appears to be a system font or something. It appears my custom, included font is simply ignored.

 

I have screen shots from two testers, one USA, the other France; I will attempt to upload them here once I figure out how.

 

Thank you!



[TOPIC: post.html]
#6

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,009 posts
  • Corona SDK

What happens in Spanish? Is it a closed or open Android testing? All my phones are in Spanish.



[TOPIC: post.html]
#7

pgyore

[GLOBAL: userInfoPane.html]
pgyore
  • Observer

  • 9 posts
  • Corona SDK

Sorry, I should have included a link. The app is free and on Google Play. https://play.google.com/store/apps/details?id=com.greenchile505.speedwatch2free Thanks again.

[TOPIC: post.html]
#8

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 582 posts
  • Corona SDK

Sounds to me like this is just an issue concerning "a person who happens to be French", instead of French users in general. With that, I don't think that I can help you solve why something doesn't work for someone for some unknown reasons. :D

The documentation does state that there may be compatibility issues with custom fonts across operating systems and OS versions, and that failing to load the custom font means defaulting to system font.



[TOPIC: post.html]
#9

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,009 posts
  • Corona SDK

I just tried on my device in Spanish and even switched it over to French. Running Android 9.0. No issue what so ever. It is still in English but no default font.



[TOPIC: post.html]
#10

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 904 posts
  • Corona SDK

Here's my take:

1) Is this replicated on other French devices? It may very well be that the reason it's not working is not because of "French phone", but because of something completely different (like the iOS version), that just happens to be different on the French phone.

2) Rename the font to something else, preferably with a more complex name. "lcd.ttf" might be taken by another font on this phone.

3) Fonts are notoriously fickle, especially free fonts - which typically lack a lot of data that is needed for good font handling. I'm assuming this font was free. Try the exact same thing, but with another font. From the look of things, it's a standard lcd digit font, of which you should be able to find many version.

 

My money is on option 3: the free font is lacking critical data. Some phone/OS combinations are forgiving of this, your French user's phone is not, for some reason. Using a better quality font will most likely fix this.

 

Paid fonts work best, but unfortunately are expensive, like this one for 200 euro for app use:

https://www.myfonts.com/fonts/efscangraphic/lcd-sh/#family/53258



[TOPIC: post.html]
#11

pgyore

[GLOBAL: userInfoPane.html]
pgyore
  • Observer

  • 9 posts
  • Corona SDK

Thank you, all, for the help. This is good information. I will start with another font - one with a unique name perhaps.

 

I truly appreciate your time on this. I will post again here, for anyone interested, once I've made the changes and uploaded a new build.

 

 

 

Best regards.



[TOPIC: post.html]
#12

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 904 posts
  • Corona SDK

You're welcome.

 

Fonts are really hard to build. New font designer typically only design the letter shapes and copy/paste them into a font building application. If they make the effort they will kern (or "letterspace") the characters, so a V shape and an A shape "slide into eachother" a bit, which looks nicer.

 

The problem is, fonts are in fact really, really tricky to design well, and include tons of information about type hinting on digital screens, on printers, compatibility issues with older font systems, classification, Postscript compatibility issues, binary and ASCII issues, international font classification and copyright/embedding data and flags.

 

This is where free font designers fall short of their professional counterparts: more often than not, they don't understand and don't include this part of the work. Some operating system work around this, assume certain info if it's missing, or try to fail gracefully. Other operating systems (or versions of them) just kill the font if it's not up to standard.



[TOPIC: post.html]
#13

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,009 posts
  • Corona SDK

You can also try doing a gliph of your font.



[TOPIC: post.html]
#14

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,963 posts
  • Corona SDK

I used custom fonts and my games are played in like every country in the world and never once have I had a font issue!

 

You simply need to use a font that supports all locales.  If a font does not support a certain locale then Corona defaults to the system font.



[TOPIC: post.html]
#15

pgyore

[GLOBAL: userInfoPane.html]
pgyore
  • Observer

  • 9 posts
  • Corona SDK

Thank you again for the help. This is my first app written with Corona Labs SDK. I just realized my other app has an LCD font, but I wrote it about 7 years ago, and at least 3 computers ago. I think I will go find that font and see it works. If it does, I can blame the font and not Corona. Thank you.


[topic_controls]
[/topic_controls]