- font = fontRoot.deriveFont(Font.PLAIN, fontSize);
- } catch (java.awt.FontFormatException e) {
- e.printStackTrace();
- font = new Font(Font.MONOSPACED, Font.PLAIN, fontSize);
- } catch (java.io.IOException e) {
- e.printStackTrace();
- font = new Font(Font.MONOSPACED, Font.PLAIN, fontSize);
+ font = fontRoot.deriveFont(Font.PLAIN, fontSize - 2);
+ } catch (FontFormatException e) {
+ // Ideally we would report an error here, either via System.err
+ // or TExceptionDialog. However, I do not want GlyphMaker to
+ // know about available backends, so we quietly fallback to
+ // whatever is available as MONO.
+ font = new Font(Font.MONOSPACED, Font.PLAIN, fontSize - 2);
+ } catch (IOException e) {
+ // See comment above.
+ font = new Font(Font.MONOSPACED, Font.PLAIN, fontSize - 2);