• Post Reply Bookmark Topic Watch Topic
  • New Topic

Identify Monospaced Fonts  RSS feed

Rohit Bhagwat
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello sir, friends, madam,

I want to identify System fonts which are monospaced. I then have to display the names of such fonts in combo box. I got the list of all system fonts installed on machine. Now I need to check which of them are monospaced. For this I tried doing the following Font.getAttributes(). This method returns a Map contains TextAttributes as key. So I used TextAttribute.FAMILY as a key to retrive the value from the map. But then I am getting other fonts as well apart from monospaced fonts.

Can anybody suggests whether I am on right track or can anyone provide some alternative to that I can reach the solution ?
Waiting for your replies.

Thanks and Regards
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!