File: use-packaged-font.diff

package info (click to toggle)
openmsx 18.0-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 23,600 kB
  • sloc: cpp: 167,019; xml: 46,204; tcl: 18,022; python: 5,373; sh: 77; makefile: 38
file content (71 lines) | stat: -rw-r--r-- 3,211 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Description: Use packaged font instead of bundled
 OpenMSX bundles its console font.  This patch makes it use the version from the fonts-dejavu-core package instead.
Origin: vendor
Forwarded: not-needed
Last-Update: 2017-08-05

Index: openmsx-18.0/src/console/OSDConsoleRenderer.cc
===================================================================
--- openmsx-18.0.orig/src/console/OSDConsoleRenderer.cc
+++ openmsx-18.0/src/console/OSDConsoleRenderer.cc
@@ -37,7 +37,7 @@ constexpr int CHAR_BORDER = 4;
 
 // class OSDConsoleRenderer
 
-constexpr std::string_view defaultFont = "skins/VeraMono.ttf.gz";
+constexpr std::string_view defaultFont = DEFAULT_FONT;
 
 OSDConsoleRenderer::OSDConsoleRenderer(
 		Reactor& reactor_, CommandConsole& console_,
Index: openmsx-18.0/src/console/OSDText.cc
===================================================================
--- openmsx-18.0.orig/src/console/OSDText.cc
+++ openmsx-18.0/src/console/OSDText.cc
@@ -27,7 +27,7 @@ namespace openmsx {
 
 OSDText::OSDText(Display& display_, const TclObject& name_)
 	: OSDImageBasedWidget(display_, name_)
-	, fontfile("skins/Vera.ttf.gz")
+	, fontfile(DEFAULT_FONT)
 	, size(12)
 	, wrapMode(NONE), wrapw(0.0), wraprelw(1.0)
 {
Index: openmsx-18.0/src/openmsx.hh
===================================================================
--- openmsx-18.0.orig/src/openmsx.hh
+++ openmsx-18.0/src/openmsx.hh
@@ -4,6 +4,8 @@
 #include "build-info.hh"
 #include <cstdint>
 
+#define DEFAULT_FONT "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf"
+
 #if PLATFORM_ANDROID
 #include <android/log.h>
 #define ad_printf(...) __android_log_print(ANDROID_LOG_INFO, "openMSX", __VA_ARGS__)
Index: openmsx-18.0/share/scripts/_osd_menu.tcl
===================================================================
--- openmsx-18.0.orig/share/scripts/_osd_menu.tcl
+++ openmsx-18.0/share/scripts/_osd_menu.tcl
@@ -71,7 +71,7 @@ proc menu_create {menudef} {
 	set deftextcolor [get_optional menudef "text-color" $default_text_color]
 	set selectcolor  [get_optional menudef "select-color" $default_select_color]
 	set deffontsize  [get_optional menudef "font-size" 12]
-	set deffont      [get_optional menudef "font" "skins/Vera.ttf.gz"]
+	set deffont      [get_optional menudef "font" "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf"]
 	set bordersize   [get_optional menudef "border-size" 0]
 	set on_open      [get_optional menudef "on-open" ""]
 	set on_close     [get_optional menudef "on-close" ""]
Index: openmsx-18.0/doc/manual/commands.html
===================================================================
--- openmsx-18.0.orig/doc/manual/commands.html
+++ openmsx-18.0/doc/manual/commands.html
@@ -3040,7 +3040,7 @@
 
   <h3><a id="consolefont">consolefont</a></h3>
 
-  <p>Change the console font. This should be the filename of a True Type Font. The default value is <code>skins/VeraMono.ttf.gz</code>.</p>
+  <p>Change the console font. This should be the filename of a True Type Font. The default value is <code>/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf</code>.</p>
   <p>Font files of other types than True Type Fonts (TTF) are not supported. The font must also be monospaced.</p>
 
   <div class="subsectiontitle">