[clutter] osx: Use Lucida Grande as the default font
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] osx: Use Lucida Grande as the default font
- Date: Sat, 7 Jan 2012 10:43:09 +0000 (UTC)
commit d8e855e5854f57053f6fad491e9860dcc7287e56
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Jan 7 10:41:25 2012 +0000
osx: Use Lucida Grande as the default font
Instead of falling back to the generic "Sans".
clutter/osx/clutter-backend-osx.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/clutter/osx/clutter-backend-osx.c b/clutter/osx/clutter-backend-osx.c
index be7d75e..ccb7f39 100644
--- a/clutter/osx/clutter-backend-osx.c
+++ b/clutter/osx/clutter-backend-osx.c
@@ -38,6 +38,8 @@
#import <AppKit/AppKit.h>
+#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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]