Thursday, February 21, 2008

Do you want to find the Fonts which supports Unicode Format?

Run this FontCheck Program and know the fonts supporting Unicode Format.

import java.awt.*;

class FontCheck
{
public static void main(String[] args)

{
GraphicsEnvironment ge=
GraphicsEnvironment.getLocalGraphicsEnvironment();
Font[] fonts=ge.getAllFonts();
// Iterating the fonts
for (int i=0; i if(fonts[i].canDisplay('\u1101'))

{
System.out.println(fonts[i].getFontName());
}
}
}
}

No comments: