WingDings, ttf and glyph

B

bigbinc

Is there any reason why the wingding glyph cant be loaded runtime.


File _file = new File("fonts/WINGDNG3.TTF");
FileInputStream fis = new FileInputStream(_file);

font = java.awt.Font.createFont(java.awt.Font.TRUETYPE_FONT, fis);

System.out.println(font.getName());
System.out.println("" + font.isBold());
System.out.println("" + font.isPlain());

char nb = (char)0;
for (int z = 0; z < 255; z++) {

System.out.println(nb + " " + font.canDisplay(nb));
nb++;

} // end of


I get false all the way down...
 
B

Berlin Brown

bigbinc said:
Is there any reason why the wingding glyph cant be loaded runtime.


File _file = new File("fonts/WINGDNG3.TTF");
FileInputStream fis = new FileInputStream(_file);

font = java.awt.Font.createFont(java.awt.Font.TRUETYPE_FONT, fis);

System.out.println(font.getName());
System.out.println("" + font.isBold());
System.out.println("" + font.isPlain());

char nb = (char)0;
for (int z = 0; z < 255; z++) {

System.out.println(nb + " " + font.canDisplay(nb));
nb++;

} // end of


I get false all the way down...

figured it out, it is not a standard ansi charset character, you have to
use glyphvector.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top