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-21.0+dfsg/src/console/OSDText.cc
===================================================================
--- openmsx-21.0+dfsg.orig/src/console/OSDText.cc
+++ openmsx-21.0+dfsg/src/console/OSDText.cc
@@ -19,13 +19,15 @@
#include <cmath>
#include <memory>
+#include "openmsx.hh"
+
using namespace gl;
namespace openmsx {
OSDText::OSDText(Display& display_, const TclObject& name_)
: OSDImageBasedWidget(display_, name_)
- , fontFile("skins/DejaVuSans.ttf.gz")
+ , fontFile(DEFAULT_FONT)
{
}
Index: openmsx-21.0+dfsg/src/openmsx.hh
===================================================================
--- openmsx-21.0+dfsg.orig/src/openmsx.hh
+++ openmsx-21.0+dfsg/src/openmsx.hh
@@ -1,6 +1,11 @@
#ifndef OPENMSX_HH
#define OPENMSX_HH
+#ifndef DEFAULT_FONT
+#define DEFAULT_FONT "skins/DejaVuSans.ttf.gz"
+#define DEFAULT_MONO_FONT "skins/DejaVuSansMono.ttf.gz"
+#endif
+
// Still needed in <CustomBuild> in 'openmsx.vcxproj'.
// Maybe that should be change into a <PreBuildEvent>?
Index: openmsx-21.0+dfsg/share/scripts/_osd_menu.tcl
===================================================================
--- openmsx-21.0+dfsg.orig/share/scripts/_osd_menu.tcl
+++ openmsx-21.0+dfsg/share/scripts/_osd_menu.tcl
@@ -72,7 +72,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/DejaVuSans.ttf.gz"]
+ set deffont [get_optional menudef "font" "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"]
# set default border to 0.5 to avoid content ending up in the outer
# (black) edge
set bordersize [get_optional menudef "border-size" 0.5]
Index: openmsx-21.0+dfsg/src/imgui/ImGuiManager.cc
===================================================================
--- openmsx-21.0+dfsg.orig/src/imgui/ImGuiManager.cc
+++ openmsx-21.0+dfsg/src/imgui/ImGuiManager.cc
@@ -138,8 +138,8 @@ static void cleanupImGui()
ImGuiManager::ImGuiManager(Reactor& reactor_)
: reactor(reactor_)
- , fontPropFilename(reactor.getCommandController(), "gui_font_default_filename", "TTF font filename for the default GUI font", "DejaVuSans.ttf.gz")
- , fontMonoFilename(reactor.getCommandController(), "gui_font_mono_filename", "TTF font filename for the monospaced GUI font", "DejaVuSansMono.ttf.gz")
+ , fontPropFilename(reactor.getCommandController(), "gui_font_default_filename", "TTF font filename for the default GUI font", DEFAULT_FONT)
+ , fontMonoFilename(reactor.getCommandController(), "gui_font_mono_filename", "TTF font filename for the monospaced GUI font", DEFAULT_MONO_FONT)
, fontPropSize(reactor.getCommandController(), "gui_font_default_size", "size for the default GUI font", 13, 9, 72)
, fontMonoSize(reactor.getCommandController(), "gui_font_mono_size", "size for the monospaced GUI font", 13, 9, 72)
, windowPos{SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED}
|