Bug 7402 - Can not create custom font using Assets/fonts folder
Summary: Can not create custom font using Assets/fonts folder
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: 4.0
Hardware: Other Other
: --- normal
Target Milestone: ---
Assignee: Alan McGovern
Depends on:
Reported: 2012-09-22 21:56 UTC by Imgen Tata
Modified: 2012-09-24 12:54 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Imgen Tata 2012-09-22 21:56:18 UTC
Description of Problem:
I'm porting a java android app to MFA, but fount out that creating of custom font using below code is throwing error:
var lcdFont = Typeface.CreateFromAsset(Assets, "fonts/lcd2mono.ttf");
The same code is working in Java using Eclipse, and I also verified that the font file is valid

Steps to reproduce the problem:
1. Create a MFA app, put lcd2mono.ttf into Assets/fonts folder
2. Load custom font from assets

Actual Results:
Throw runtime error saying Native typeface can not be made

Expected Results:
Everything is fine

How often does this happen? 

Additional Information:
I'm using it on Win8 RP with MonoDevelop and MFA 4.2.6 and SDK 2.1, but I also tried with SDK 2.2 and 2.3.3, none of which work. Also the java android app is using 2.1.
Comment 1 Imgen Tata 2012-09-22 22:03:23 UTC
Sorry, it seems that the issue with this is my stupidity ---- I forgot to include the font file in the project. It is showing up in the project tree only because I choose to show all files. Anyway, fixed. Sorry for the false alert
Comment 2 Mikayla Hutchinson [MSFT] 2012-09-24 12:54:23 UTC
No worries, closing,