File: 07-use_system_fonts.patch

package info (click to toggle)
josm 0.0.svn19439%2Bdfsg-1~bpo13%2B1
  • links: PTS, VCS
  • area: main
  • in suites: trixie-backports
  • size: 244,792 kB
  • sloc: java: 491,692; xml: 201,667; perl: 10,319; jsp: 265; sh: 219; makefile: 118; javascript: 74; python: 60
file content (27 lines) | stat: -rw-r--r-- 1,241 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Use system Noto fonts, instead of the embedded Droid fonts.
Author: David Paleino <dapal@debian.org>
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: not-needed

--- a/src/org/openstreetmap/josm/tools/FontsManager.java
+++ b/src/org/openstreetmap/josm/tools/FontsManager.java
@@ -22,8 +22,8 @@ public final class FontsManager {
      * List of fonts embedded into JOSM jar.
      */
     private static final Collection<String> INCLUDED_FONTS = Arrays.asList(
-            "DroidSans.ttf",
-            "DroidSans-Bold.ttf"
+            "NotoSans-Regular.ttf",
+            "NotoSans-Bold.ttf"
     );
 
     private FontsManager() {
@@ -36,7 +36,7 @@ public final class FontsManager {
     public static void initialize() {
         GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
         for (String fontFile : INCLUDED_FONTS) {
-            String url = "resource://data/fonts/"+fontFile;
+            String url = "/usr/share/fonts/truetype/noto/"+fontFile;
             try (CachedFile cf = new CachedFile(url); InputStream i = cf.getInputStream()) {
                 ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, i));
             } catch (IOException | FontFormatException ex) {