Traces tab with monospaced font in linux

Discuss issues related to PS3 Media Server development (only for programmers)

Traces tab with monospaced font in linux

Postby infidel » Sun Apr 01, 2012 8:13 pm

This is no big deal, but having just built 1.52.1 I notice my traces tab is now rendered in the nearly unreadable ubuntu courier new due to this commit. How about defaulting to the logical monospace font (which would map to courier new in Windows anyway, I think?) and is a little easier on the eyes in linux.

Code: Select all
diff --git a/src/main/java/net/pms/newgui/TracesTab.java b/src/main/java/net/pms
index bde3408..6f14fdc 100644
--- a/src/main/java/net/pms/newgui/TracesTab.java
+++ b/src/main/java/net/pms/newgui/TracesTab.java
@@ -97,7 +97,7 @@ public class TracesTab {
                jList = new JTextArea();
                jList.setEditable(false);
                jList.setBackground(Color.WHITE);
-               jList.setFont(new Font("Courier New", Font.PLAIN, 12));
+               jList.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
                final JPopupMenu popup = new JPopupMenu();
                JMenuItem defaultItem = new JMenuItem(Messages.getString("Traces
infidel
 
Posts: 278
Joined: Sun Aug 15, 2010 4:56 pm

Re: Traces tab with monospaced font in linux

Postby Raptor399 » Mon Apr 02, 2012 8:08 am

Good idea, committed.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Traces tab with monospaced font in linux

Postby SubJunk » Mon Apr 02, 2012 9:43 am

Cool!
SubJunk
 
Posts: 1208
Joined: Fri Mar 27, 2009 5:25 am

Re: Traces tab with monospaced font in linux

Postby infidel » Mon Apr 02, 2012 1:20 pm

Thanks!

Btw it's (apparently) possible to customize one's logical font mapping by editing
Code: Select all
$JAVA_HOME/lib/fontconfig.properties
which in ubuntu works out to /usr/lib/jvm/default-java/jre/lib/fontconfig.properties.

If the file doesn't exist in your setup, copy fontconfig.properties.src (which hopefully does exist) to fontconfig.properties and edit that, more details here.
infidel
 
Posts: 278
Joined: Sun Aug 15, 2010 4:56 pm


Return to Developers

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests