Thursday 31 January 2019

java - Issue when using a custom font - "native typeface cannot be made"



I'm trying to use a font I found on the internet, but the problem is that I get an FC with "native typeface cannot be made".



Here is the code in the getView of my ListVIew:



        holder.tv_SuraName   =(TextView)convertView.findViewById(R.id.Start_Name);
holder.tv_SuraName.setTypeface(Typeface.createFromAsset(mContext.getAssets(), "suralist_font.ttf"));



Can anyone tell me why can I use the custom rom? You can get it HERE .. the file is .ttf


Answer



The font file is either corrupt or unsupported for some reason. You can drop it on the SD card and load it from file, to make sure it's not a problem with your assets.


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...