how can i import musica fonts into eclipse to support musical unicode? Any workaround?
+1
A:
This is the simple one.
create a folder in the root of your project called assets/fonts/
then paste the TTF font file (in this case Verdana.ttf). Then, if you want to apply that font to, say a TextView, do the following:
public class FontSampler extends Activity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
TextView tv=(TextView)findViewById(R.id.custom);
Typeface face=Typeface.createFromAsset(getAssets(),
"fonts/Verdana.ttf");
tv.setTypeface(face);
}
}
This example was taken from the ComonsWare book (written by Mark Murphy). You can download the full example from GitHub .
PM - Paresh Mayani
2010-08-23 06:35:54
It works. Thanks!
bamboolouie
2010-08-23 14:45:20
@bamboolouie glad about ur reply
PM - Paresh Mayani
2010-08-24 18:29:32