Using Font-Manager error

Where is the equivalent of the system.ResourceDirectory on windows?

I have put my .png and .fnt files in a “fonts” folder in the “Assets/Corona” folder, the “Assets” folder alone, and even the “Resources” folder in Visual Studio

But I keep triggering the assert in the fontmanager.lua giving me an error stating this:

Could not access fonts/berlinFont.fnt in system.ResourceDirectory

By default, the “Assets\Corona” directory is your root system.ResourceDirectory.

So, you need to put your font files in the following folder:  “Assets\Corona\fonts”

Also, please note steps 5 and 6 in our porting guide as well as bullet #3 in the “Notes” block here…

   http://docs.coronalabs.com/daily/coronacards/wp8/portapp.html#copying-project-files

To summarize, Visual Studio will only include asset files within your *.xap app bundle if their “Build Action” is flagged as “Content”.  If Visual Studio does not recognize your asset file’s extension, then Visual Studio will not automatically include that file within your app.  So, you’ll need to highlight your *.fnt files in the “Solution Explorer” panel and change their “Build Action” property to “Content” yourself.  That will make this work.

That’s embarrassing. I had remembered the content thing, but I remembered to do it with the first set of files that I immediately deleted due to noticing they were the wrong fonts… then forgot to do it to the new ones!

I really did read the porting guide! Promise!

Thanks Joshua :slight_smile:

No problem!  :slight_smile:

I’ve made this mistake before too.

By default, the “Assets\Corona” directory is your root system.ResourceDirectory.

So, you need to put your font files in the following folder:  “Assets\Corona\fonts”

Also, please note steps 5 and 6 in our porting guide as well as bullet #3 in the “Notes” block here…

   http://docs.coronalabs.com/daily/coronacards/wp8/portapp.html#copying-project-files

To summarize, Visual Studio will only include asset files within your *.xap app bundle if their “Build Action” is flagged as “Content”.  If Visual Studio does not recognize your asset file’s extension, then Visual Studio will not automatically include that file within your app.  So, you’ll need to highlight your *.fnt files in the “Solution Explorer” panel and change their “Build Action” property to “Content” yourself.  That will make this work.

That’s embarrassing. I had remembered the content thing, but I remembered to do it with the first set of files that I immediately deleted due to noticing they were the wrong fonts… then forgot to do it to the new ones!

I really did read the porting guide! Promise!

Thanks Joshua :slight_smile:

No problem!  :slight_smile:

I’ve made this mistake before too.