1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.gnu.jfiglet;
22
23 import java.io.IOException;
24
25 import org.gnu.jfiglet.core.FIGFont;
26 import org.gnu.jfiglet.core.FIGure;
27 import org.gnu.jfiglet.core.IllegalFIGFontFileException;
28 import org.gnu.jfiglet.utils.FIGUtils;
29
30 /***
31 * @TODO : DOCUMENT ME !
32 *
33 * @version $Id: JFiglet.java,v 1.6 2004/05/11 19:23:00 sbrunot Exp $
34 *
35 * @author <a href="mailto:sebastien.brunot@club-internet.fr">Sebastien Brunot</a>
36 *
37 */
38 public class JFiglet
39 {
40 /***
41 * Draws some examples of FIGures on standard output
42 * @param args none
43 * @throws IOException
44 */
45 public static void main(String[] args) throws IOException, IllegalFIGFontFileException
46 {
47 JFiglet test = new JFiglet();
48 test.run();
49 }
50
51 private void run() throws IOException, IllegalFIGFontFileException
52 {
53 FIGFont standardFont = new FIGFont("standard");
54 standardFont.loadFromFile();
55 FIGFont nipplesFont = new FIGFont("nipples");
56 nipplesFont.loadFromFile();
57 FIGDriver figDriver = new FIGDriver();
58 FIGure figure = figDriver.getBannerFIGure("JFiglet", standardFont);
59 FIGUtils.renderFIGureToOutputStream(figure, System.out, System.getProperty("line.separator"));
60 figure = figDriver.getBannerFIGure("FAAC", standardFont);
61 FIGUtils.renderFIGureToOutputStream(figure, System.out, System.getProperty("line.separator"));
62 figure = figDriver.getBannerFIGure("LT", standardFont);
63 FIGUtils.renderFIGureToOutputStream(figure, System.out, System.getProperty("line.separator"));
64 figure = figDriver.getBannerFIGure("DOOM", nipplesFont);
65 FIGUtils.renderFIGureToOutputStream(figure, System.out, System.getProperty("line.separator"));
66 }
67 }