MCPcopy Create free account
hub / github.com/benfry/processing4 / CreateFont

Class CreateFont

app/src/processing/app/tools/CreateFont.java:54–308  ·  view source on GitHub ↗

GUI tool for font creation heaven/hell.

Source from the content-addressed store, hash-verified

52 * GUI tool for font creation heaven/hell.
53 */
54public class CreateFont extends JFrame implements Tool {
55 Base base;
56
57 JList<String> fontSelector;
58 JTextField sizeSelector;
59 JButton charsetButton;
60 JCheckBox smoothBox;
61 JComponent sample;
62 JButton okButton;
63 JTextField filenameField;
64
65 String[] fontNames;
66 Map<String, Font> nameToFont;
67
68 Font font;
69 int selection = -1;
70 boolean smooth = true;
71
72 CharacterSelector charSelector;
73
74
75 public CreateFont() {
76 super(Language.text("create_font"));
77 }
78
79
80 public String getMenuTitle() {
81 return Language.text("menu.tools.create_font");
82 }
83
84
85 public void init(Base base) {
86 this.base = base;
87
88 Container paine = getContentPane();
89 paine.setLayout(new BorderLayout()); //10, 10));
90
91 JPanel pain = new JPanel();
92 pain.setBorder(new EmptyBorder(13, 13, 13, 13));
93 paine.add(pain, BorderLayout.CENTER);
94
95 pain.setLayout(new BoxLayout(pain, BoxLayout.Y_AXIS));
96
97 String labelText = Language.text("create_font.label");
98
99 JTextArea textarea = new JTextArea(labelText);
100 textarea.setBorder(new EmptyBorder(10, 10, 20, 10));
101 textarea.setBackground(null);
102 textarea.setEditable(false);
103 textarea.setHighlighter(null);
104 textarea.setFont(new Font("Dialog", Font.PLAIN, 12));
105 pain.add(textarea);
106
107
108 // getFontList is deprecated in 1.4, so this has to be used
109 //long t = System.currentTimeMillis();
110 GraphicsEnvironment ge =
111 GraphicsEnvironment.getLocalGraphicsEnvironment();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected