Example usage for com.lowagie.text FontFactoryImp getRegisteredFonts

List of usage examples for com.lowagie.text FontFactoryImp getRegisteredFonts

Introduction

In this page you can find the example usage for com.lowagie.text FontFactoryImp getRegisteredFonts.

Prototype


public Set getRegisteredFonts() 

Source Link

Document

Gets a set of registered fontnames.

Usage

From source file:com.amphisoft.epub2pdf.content.TextFactory.java

License:Open Source License

public static void main(String[] args) {

    FontFactoryImp fontFI = FontFactory.getFontImp();

    System.out.println("\nFAMILIES");
    Set<Object> famsRaw = fontFI.getRegisteredFamilies();
    Set<String> fams = new TreeSet<String>();
    for (Object s : famsRaw) {
        fams.add(s.toString());//from w w w. j a  v a  2  s .c o m
    }
    for (String s : fams) {
        System.out.println(s);
    }

    System.out.println("\nFONTS");
    Set<Object> fontsRaw = fontFI.getRegisteredFonts();
    Set<String> fonts = new TreeSet<String>();
    for (Object s : fontsRaw) {
        fonts.add(s.toString());
    }
    for (String s : fonts) {
        System.out.println(s);
    }

    TextFactory pF = new TextFactory();
    Paragraph para = pF.newParagraph();
    System.out.println(para.getFont().getFamilyname());
}