From d8e855e5854f57053f6fad491e9860dcc7287e56 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 7 Jan 2012 10:41:25 +0000 Subject: [PATCH] osx: Use Lucida Grande as the default font Instead of falling back to the generic "Sans". --- clutter/osx/clutter-backend-osx.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/clutter/osx/clutter-backend-osx.c b/clutter/osx/clutter-backend-osx.c index be7d75e39..ccb7f3923 100644 --- a/clutter/osx/clutter-backend-osx.c +++ b/clutter/osx/clutter-backend-osx.c @@ -38,6 +38,8 @@ #import +#define DEFAULT_FONT_NAME "Lucida Grande 13" + #define clutter_backend_osx_get_type _clutter_backend_osx_get_type G_DEFINE_TYPE (ClutterBackendOSX, clutter_backend_osx, CLUTTER_TYPE_BACKEND) @@ -47,6 +49,8 @@ static gboolean clutter_backend_osx_post_parse (ClutterBackend *backend, GError **error) { + ClutterSettings *settings = clutter_settings_get_default (); + CLUTTER_OSX_POOL_ALLOC(); /* getting standart dpi for main screen */ NSDictionary* prop = [[NSScreen mainScreen] deviceDescription]; @@ -57,15 +61,15 @@ clutter_backend_osx_post_parse (ClutterBackend *backend, /* setting dpi for backend, it needs by font rendering library */ if (size.height > 0) { - ClutterSettings *settings = clutter_settings_get_default (); int font_dpi = size.height * 1024; g_object_set (settings, "font-dpi", font_dpi, NULL); - - return TRUE; } - return FALSE; + /* set the default font name */ + g_object_set (settings, "font-name", DEFAULT_FONT_NAME, NULL); + + return TRUE; } static ClutterFeatureFlags