But as I was on this, I decided to check how to do it for Windows 7 :). These are the steps:
- Download the font file (extension ttf). There are several free sites. Check in case they are not completely free (donation, or shareware, or...). This is a site I used.
- For the next step, folks say to make sure that all your office programs (Outlook, Word, etc...) are closed.
- If the file is zip, unzip it (duh!), and then right click on the file and select Open with - Windows Font Viewer. You will see the fonts and on top, the Install button.
- Done! You should now be able to see them in your Font menus, in Office.
For Android programming:
- Download the font file (extension ttf). There are several free sites. Check in case they are not completely free (donation, or shareware, or...). This is a site I used.
- If the file is zip, unzip it (duh!), and then place it in the assests directory of your project.
- Then use something like the following (basically extracted from this post in StackOverflow):
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mdisplay = (TextView) findViewById(R.id.textView1);
try{
Typeface myTypeface = Typeface.createFromAsset(this.getAssets(),"wwDigital.ttf");
mdisplay.setTypeface(myTypeface);
}
catch (IllegalStateException e){
System.out.println("This didn't work very well");
return;
}
mdisplay.setTextSize(50);
mdisplay.setTextColor(Color.RED);
}
Good luck!
PS.: Please, click here to see an index of other posts on Android.
No comments:
Post a Comment