summaryrefslogtreecommitdiffstats
path: root/windows.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-22 15:22:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-22 15:56:57 -0700
commite893f6bd9db696a1d647b796138233152ca290fa (patch)
tree32b5fad9d0a958257817fb3d134d53f881ef9127 /windows.c
parent438fe5dbde222c73e22441a6e39c85c8c887218b (diff)
downloadsubsurface-e893f6bd9db696a1d647b796138233152ca290fa.tar.gz
Use the Windows default font on Windows 7 and 8/8.1
It contains the characters we need and will make the application look more "native". See #712 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'windows.c')
-rw-r--r--windows.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/windows.c b/windows.c
index 099ad502e..a4fe1e2c2 100644
--- a/windows.c
+++ b/windows.c
@@ -12,12 +12,22 @@
#include <dirent.h>
#include <zip.h>
-const char system_divelist_default_font[] = "Calibri";
-const int system_divelist_default_font_size = 8;
+const char non_standard_system_divelist_default_font[] = "Calibri";
+const char current_system_divelist_default_font[] = "Segoe UI";
+const char *system_divelist_default_font = non_standard_system_divelist_default_font;
+const int system_divelist_default_font_size = 9;
void subsurface_user(struct user_info *user)
{ /* Encourage use of at least libgit2-0.20 */ }
+extern bool isWin7Or8();
+
+void subsurface_OS_pref_setup(void)
+{
+ if (isWin7Or8())
+ system_divelist_default_font = current_system_divelist_default_font;
+}
+
const char *system_default_filename(void)
{
char datapath[MAX_PATH];