Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Font information in java

Posted on 2004-08-17
Medium Priority
Last Modified: 2013-12-03
I have 2 questions about the java fonts.
 1. How to determine if a font is a fixed-width font?
 2. How to determine the language(s) supported by a given font?

Question by:shji1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 35

Assisted Solution

girionis earned 240 total points
ID: 11821341
Not sure about fixed width. For your second question you might be able to do it if you read the properties of the fonts. For more info have a look here:
LVL 20

Accepted Solution

Venabili earned 260 total points
ID: 11856851
1. Use
and check the size of i and W
At least I do not know other way... (you may check all the letters also but i and W are different in any not fixed size font)

About the FontMetrics object - you will need some strange things to do .. as most of the way to take it are deprecated. *sigh*Use this for example:
Or if you have another Graphic object you have no troubles :)

2. girionis gave you the only answer I know....

Author Comment

ID: 11862731
Thanks :-)
LVL 35

Expert Comment

ID: 11862982
LVL 20

Expert Comment

ID: 11867850

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question