import com.lowagie.text.pdf.BaseFont;
public class FullFontNamesPDF {
public static void main(String[] args) {
try {
BaseFont bf = BaseFont.createFont("c:\\windows\\fonts\\arial.ttf", "winansi",
BaseFont.NOT_EMBEDDED);
System.out.println("postscriptname: " + bf.getPostscriptFontName());
String names[][] = bf.getFullFontName();
System.out.println("\n\nListing the full font name:\n\n");
for (int k = 0; k < names.length; ++k) {
System.out.println(names[k][3] + "\r\n");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
|