Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.awt.Font on Ubuntu Server

843807May 2 2009 — edited May 3 2009
I have written a java servlet that runs through Apache Tomcat. The problem I am having is that when I run in on my Mac OS or Windows boxes fonts render properly (I am creating a PNG image with the servlet). When I move my code to my production box (Ubuntu SE) it recognizes only a handful of the installed fonts.

I am new to Java so I have no idea why this is happening. I am using the following code to output my fonts:
response.setContentType("text/html");
PrintWriter out = response.getWriter();
for (String fontName : GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames())
{
	out.println(fontName);
}
return;
I am almost positive this is a Java issue... (but almost isn't 100%)

Thanks for any help. I hope its a simple issue of having the fonts in the proper directory or something.

Thanks.

ebn
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 31 2009
Added on May 2 2009
4 comments
329 views