Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 7895)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 7896)
@@ -8,4 +8,5 @@
 
 import java.awt.Dimension;
+import java.awt.GraphicsEnvironment;
 import java.awt.Image;
 import java.awt.Toolkit;
@@ -368,4 +369,6 @@
         FontsManager.initialize();
 
+        handleSpecialLanguages();
+
         final JFrame mainFrame = new JFrame(tr("Java OpenStreetMap Editor"));
         Main.parent = mainFrame;
@@ -479,4 +482,18 @@
             info("Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console");
             RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager());
+        }
+    }
+
+    private static void handleSpecialLanguages() {
+        // Use special font for Khmer script, as the default Java font do not display these characters
+        if ("km".equals(Main.pref.get("language"))) {
+            Collection<String> fonts = Arrays.asList(
+                    GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
+            for (String f : new String[]{"Khmer UI", "DaunPenh", "MoolBoran"}) {
+                if (fonts.contains(f)) {
+                    GuiHelper.setUIFont(f);
+                    break;
+                }
+            }
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java	(revision 7895)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java	(revision 7896)
@@ -6,5 +6,4 @@
 
 import java.awt.Dimension;
-import java.awt.Font;
 import java.awt.GridBagLayout;
 import java.util.ArrayList;
@@ -45,4 +44,5 @@
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
 import org.openstreetmap.josm.gui.mappaint.xml.XmlStyleSource;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.widgets.JosmTextArea;
 import org.openstreetmap.josm.tools.GBC;
@@ -95,5 +95,5 @@
         JPanel p = new JPanel(new GridBagLayout());
         JosmTextArea txtData = new JosmTextArea();
-        txtData.setFont(new Font("Monospaced", txtData.getFont().getStyle(), txtData.getFont().getSize()));
+        txtData.setFont(GuiHelper.getMonospacedFont(txtData));
         txtData.setEditable(false);
         txtData.setText(buildDataText());
@@ -325,5 +325,5 @@
         p.setLayout(new GridBagLayout());
         txtMappaint = new JosmTextArea();
-        txtMappaint.setFont(new Font("Monospaced", txtMappaint.getFont().getStyle(), txtMappaint.getFont().getSize()));
+        txtMappaint.setFont(GuiHelper.getMonospacedFont(txtMappaint));
         txtMappaint.setEditable(false);
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 7895)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 7896)
@@ -73,4 +73,5 @@
 import org.openstreetmap.josm.gui.preferences.map.MapPaintPreference;
 import org.openstreetmap.josm.gui.util.FileFilterAllFiles;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 import org.openstreetmap.josm.gui.widgets.FileChooserManager;
@@ -615,5 +616,5 @@
         private void buildSourcePanel(StyleSource s, JPanel p) {
             JosmTextArea txtSource = new JosmTextArea();
-            txtSource.setFont(new Font("Monospaced", txtSource.getFont().getStyle(), txtSource.getFont().getSize()));
+            txtSource.setFont(GuiHelper.getMonospacedFont(txtSource));
             txtSource.setEditable(false);
             p.add(new JScrollPane(txtSource), GBC.std().fill());
@@ -636,5 +637,5 @@
         private void buildErrorsPanel(StyleSource s, JPanel p) {
             JosmTextArea txtErrors = new JosmTextArea();
-            txtErrors.setFont(new Font("Monospaced", txtErrors.getFont().getStyle(), txtErrors.getFont().getSize()));
+            txtErrors.setFont(GuiHelper.getMonospacedFont(txtErrors));
             txtErrors.setEditable(false);
             p.add(new JScrollPane(txtErrors), GBC.std().fill());
Index: /trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 7895)
+++ /trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 7896)
@@ -213,5 +213,5 @@
         }
         JosmTextArea txt = new JosmTextArea();
-        txt.setFont(new Font("Monospaced", txt.getFont().getStyle(), txt.getFont().getSize()));
+        txt.setFont(GuiHelper.getMonospacedFont(txt));
         txt.setEditable(false);
         txt.setBackground(p.getBackground());
Index: /trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 7895)
+++ /trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 7896)
@@ -23,4 +23,5 @@
 import java.lang.reflect.InvocationTargetException;
 import java.util.Arrays;
+import java.util.Enumeration;
 import java.util.List;
 import java.util.concurrent.Callable;
@@ -31,4 +32,5 @@
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
+import javax.swing.JComponent;
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
@@ -37,8 +39,11 @@
 import javax.swing.SwingUtilities;
 import javax.swing.Timer;
+import javax.swing.UIManager;
+import javax.swing.plaf.FontUIResource;
 
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -297,4 +302,19 @@
 
     /**
+     * Gets the font used to display monospaced text in a component, if possible.
+     * @param component The component
+     * @return the font used to display monospaced text in a component, if possible
+     * @since 7896
+     */
+    public static Font getMonospacedFont(JComponent component) {
+        // Special font for Khmer script
+        if ("km".equals(Main.pref.get("language"))) {
+            return component.getFont();
+        } else {
+            return new Font("Monospaced", component.getFont().getStyle(), component.getFont().getSize());
+        }
+    }
+
+    /**
      * Gets the font used to display JOSM title in about dialog and splash screen.
      * @return By order or priority, the first font available in local fonts:
@@ -303,8 +323,13 @@
      *         3. Arial Bold 20
      *         4. SansSerif Bold 20
+     *         Except if current language is Khmer, where it will be current font at size 20
      * @since 5797
      */
     public static Font getTitleFont() {
         List<String> fonts = Arrays.asList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
+        // Special font for Khmer script
+        if ("km".equals(Main.pref.get("language"))) {
+            return UIManager.getFont("Label.font").deriveFont(20.0f);
+        }
         // Helvetica is the preferred choice but is not available by default on Windows
         // (https://www.microsoft.com/typography/fonts/product.aspx?pid=161)
@@ -346,3 +371,23 @@
         return Main.isPlatformOsx() ? KeyEvent.META_DOWN_MASK : KeyEvent.CTRL_DOWN_MASK;
     }
+
+    /**
+     * Sets a global font for all UI, replacing default font of current look and feel.
+     * @param name Font name. It is up to the caller to make sure the font exists
+     * @since 7896
+     * @throws IllegalArgumentException if name is null
+     */
+    public static void setUIFont(String name) {
+        CheckParameterUtil.ensureParameterNotNull(name, "name");
+        Main.info("Setting "+name+" as the default UI font");
+        Enumeration<?> keys = UIManager.getDefaults().keys();
+        while (keys.hasMoreElements()) {
+            Object key = keys.nextElement();
+            Object value = UIManager.get(key);
+            if (value != null && value instanceof FontUIResource) {
+                FontUIResource fui = (FontUIResource)value;
+                UIManager.put(key, new FontUIResource(name, fui.getStyle(), fui.getSize()));
+            }
+        }
+    }
 }
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java	(revision 7895)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java	(revision 7896)
@@ -16,4 +16,5 @@
 import javax.swing.text.html.StyleSheet;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.Utils;
@@ -83,5 +84,5 @@
         return result;
     }
-    
+
     /**
      * Adapts a {@link JEditorPane} to be used as a powerful replacement of {@link javax.swing.JLabel}.
@@ -103,4 +104,8 @@
         ss.addRule("ol {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: decimal}");
         ss.addRule("ul {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: disc}");
+        if ("km".equals(Main.pref.get("language"))) {
+            // Fix rendering problem for Khmer script
+            ss.addRule("p {" + getFontRule(UIManager.getFont("Label.font")) + "}");
+        }
         kit.setStyleSheet(ss);
         pane.setEditorKit(kit);
