if (ret == null) {
pf.parse(font);
if (pf.name.equals("tty")) pf.name = "monospace";
- ret = new MetricatedFont(pf.name, (pf.bold ? Font.BOLD : 0) | (pf.italic ? Font.ITALIC : 0), pf.size);
+
+ // Java's fonts tend to be, on average, two points smaller than Win32/X11 fonts. This is most acute in
+ // the proxy password dialog on Linux
+ ret = new MetricatedFont(pf.name, (pf.bold ? Font.BOLD : 0) | (pf.italic ? Font.ITALIC : 0), pf.size + 2);
+
fontCache.put(font, ret);
}
return ret;