Linux: Default to "monospace" font rather than try to install DroidSansMono

This commit is contained in:
Sour 2020-02-03 15:06:54 -05:00
parent 541ed96cbc
commit 85f810202a
3 changed files with 1 additions and 10 deletions

View file

@ -15,7 +15,7 @@ namespace Mesen.GUI.Controls
get get
{ {
if(Program.IsMono) { if(Program.IsMono) {
return "DroidSansMono"; return "monospace";
} else { } else {
return "Consolas"; return "Consolas";
} }

View file

@ -137,15 +137,6 @@ namespace Mesen.GUI
} else if(entry.Name == "Font.24.spritefont" || entry.Name == "Font.64.spritefont" || entry.Name == "LICENSE.txt" || entry.Name == "PixelFont.ttf") { } else if(entry.Name == "Font.24.spritefont" || entry.Name == "Font.64.spritefont" || entry.Name == "LICENSE.txt" || entry.Name == "PixelFont.ttf") {
string outputFilename = Path.Combine(ConfigManager.HomeFolder, "Resources", entry.Name); string outputFilename = Path.Combine(ConfigManager.HomeFolder, "Resources", entry.Name);
ExtractFile(entry, outputFilename); ExtractFile(entry, outputFilename);
} else if(entry.Name == "DroidSansMono.ttf" && Program.IsMono) {
string outputFilename = Path.Combine(ConfigManager.FontFolder, entry.Name);
bool needRestart = !File.Exists(outputFilename);
ExtractFile(entry, outputFilename);
if(needRestart) {
//If font is newly installed, restart Mesen (otherwise debugger will not be able to use the font and display incorrectly)
ConfigManager.RestartMesen();
return false;
}
} }
} }