I want to use Terminal
face to display read-in strings in my program (on Windows, platform independence not important).
If I use Font font = Font.decode("Terminal-10");
It is not monospaced.
IF I use Font font = new Font(Font.MONOSPACED, Font.PLAIN, 11);
All is well but it looks like Courier.
If I use (probably Im misinterpreting the API docs)
HashMap attr = new HashMap<TextAttribute,TextAttribute>();
attr.put("FAMILY", Font.MONOSPACED);
attr.put("FONT", Font.decode("Terminal-10"));
font = new Font(attr);
it's just using default values (some 12 point plain font). How to properly set attributes to a Terminal font? I'm drawing strings on a Graphics2D
and saving them with ImageIO
.