| 1 |
Description: Use system Noto fonts, instead of the embedded Droid fonts. |
| 2 |
Author: David Paleino <[email protected]> |
| 3 |
Author: Bas Couwenberg <[email protected]> |
| 4 |
Forwarded: not-needed |
| 5 |
|
| 6 |
--- a/src/org/openstreetmap/josm/tools/FontsManager.java |
| 7 |
+++ b/src/org/openstreetmap/josm/tools/FontsManager.java |
| 8 |
@@ -22,8 +22,8 @@ public final class FontsManager { |
| 9 |
* List of fonts embedded into JOSM jar. |
| 10 |
*/ |
| 11 |
private static final Collection<String> INCLUDED_FONTS = Arrays.asList( |
| 12 |
|
| 13 |
|
| 14 |
+ "NotoSans-Regular.ttf", |
| 15 |
+ "NotoSans-Bold.ttf" |
| 16 |
); |
| 17 |
|
| 18 |
private FontsManager() { |
| 19 |
@@ -36,7 +36,7 @@ public final class FontsManager { |
| 20 |
public static void initialize() { |
| 21 |
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); |
| 22 |
for (String fontFile : INCLUDED_FONTS) { |
| 23 |
|
| 24 |
+ String url = "/usr/share/fonts/truetype/noto/"+fontFile; |
| 25 |
try (CachedFile cf = new CachedFile(url); InputStream i = cf.getInputStream()) { |
| 26 |
ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, i)); |
| 27 |
} catch (IOException | FontFormatException ex) { |