I am using typeface class to set the font Monotype corsiva for an edittext
EditText ed=(EditText) findViewById(R.id.editexthead);
String path="C:\\MTCORSVA.TTF";
Typeface tf=Typeface.createFromFile(path);
ed.setTypeface(tf);
The program force closes with an exception
Is there any other way to set the path..
And when i try to manually store a .TTF on sdcard it doesn’t show up the file… any reason for that.
I don’t want to use assets folder to set the font … anybody with the solution .. ??
Please HELP
Why do you not want to store it in the assets folder? That’s what it’s for. Regardless, you can’t reference your local hard drive for it.
(also, personal opinion, Monotype Corsiva is a horrible, horrible font)
EDIT: So I would add, you should be able to do it the way you’re doing it, you just can’t use your local hard drive. Just get a reference to your TypeFace as a
File, depending on where you are saving them (e.g.Environment.getExternalStorageDirectory()) and useTypeface.createFromFile(file).