Urgent: Running html shows font file not found

Monkey Forums/Monkey Programming/Urgent: Running html shows font file not found

trainer(Posted 2013) [#1]
Hi guys,
The cr_font.png file is available in the data folder, but it says file not found!
Kindly reply ASAP




Paul - Taiphoz(Posted 2013) [#2]
For displaying text look at the modules font machine and angel font .

As for your missing font check the usual things. Case spelling and file location in the actual build folders .


trainer(Posted 2013) [#3]
Thank you. The error is solved. I have two files, cr_font.png and cr_font.txt.

When I removed the txt file, compiled again and run, its fine.


MikeHart(Posted 2013) [#4]
Glad you figure it out yourself. Please next time you are using a framework and the problem is somewhat related to it, the prefix your topic title with the name of the framework. I don't read every topic here but i always try to give support, once i know it is related to fantomEngine.

Adding to this, without the txt file, fEs font module will not be able to work correctly. So i am actually surprised that you got it working.


trainer(Posted 2013) [#5]
Yes Mike. Iam not sure why it ran when I removed the txt file.

Then I kept again both the cr_font.png and cr_font.txt files. But no error shows up. It runs fine in Internet Explorer and Firefox.

But when I ran in Chrome, I got the same error. I have kept the font files, removed the files and their reference from the source code, changed to another font, but I get the same error message in Chrome (as if there is no change to the source files), where as the IE and Firefox responds according to the changes. It sounds weird.

Any way as it runs in IE and Firefox, it does not seem to be very serious.

Mike, we have a very serious problem. Please reply us if you have some idea.

Sound files... When I run from Monkey, the Firefox and Chrome can play the sounds (but not IE).

But when I copy the files to wwwroot, and run the game from any browser, there is no audio. The game runs fine.

Same thing happens with the apk file also. No sound when installed in android phone.

This is very serious. Please reply if you have any idea.


MikeHart(Posted 2013) [#6]
Different platforms support different file formats. You need to load the ones, that run on them. Like you got already an answer about different browser behaviours. You need to load the fileformat, that your browser supports.


trainer(Posted 2013) [#7]
Thank you Mike for your reply.

Regarding the Chrome's behaviour (cr_font can not be loaded), I just tried clearing the cache and it works fine now.

Regarding the sound, we have 3 formats of all sound files, OGG WMA and MP3.
I have compiled for the html option - keeping all the three types, keeping one of each type of the files inside the data folder and tried to run, but no hope - no sound.

I wonder, when we run from MServer its fine, but from IIServer - no sound. Could not guess why?

Now Iam going to try the same (trying each type of sound file) for the android apk.

Any way, if you find any clue in between kindly reply. Thank you for your time and help.


MikeHart(Posted 2013) [#8]
You have to detect on which platform you are and then load a sound accordingly. Monkey doens't do that for you automatically. On Ie I think the best option is WAV files. IE in general is not the best browser for games.

Btw, you should update to Monkey V69 at least. Same goes for fE.