954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

getLocalGraphicsEnvironment

Any suggestions on how to get fonts from an external drive rather than on my local drive. Here is what I use now:

GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
		 Font[] fonts = ge.getAllFonts(); // Get the fonts
		 for (Font f : fonts) {
			 System.out.println(f.getFontName());
		 }
abbyo
Newbie Poster
18 posts since May 2010
Reputation Points: 10
Solved Threads: 1
 
FileInputStream fis = new FileInputStream("d:/fonts/lucida.ttf");
Font lucida = Font.createFont(Font.TRUETYPE_FONT, fis);
fis.close();
CrazyDieter
Junior Poster
108 posts since Jul 2005
Reputation Points: 11
Solved Threads: 6
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: