Jankya
Jankya

Reputation: 958

Getting installed fonts from client Machine

Could anyone point me about how to get installed fonts from client machine?

I have tried Java Webservice to retrieve fronts but after deploying it returns me server's installed fonts but I wan't fonts from client machine.

GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
Font[] fonts = e.getAllFonts(); // Get the fonts
for (Font f : fonts) {
    System.out.println(f.getFontName());
}

Upvotes: 0

Views: 86

Answers (1)

Igor Kudryashov
Igor Kudryashov

Reputation: 363

For information about the client, your code must be running on the client. The web service is executed on the server, so you get the server information. If you do not have the ability to run Java code on the client, then you need to look for a solution JavaScript + AJAX

Upvotes: 1

Related Questions