mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
osx: Use Lucida Grande as the default font
Instead of falling back to the generic "Sans".
This commit is contained in:
parent
95d3e0f962
commit
d8e855e585
@ -38,6 +38,8 @@
|
|||||||
|
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
|
#define DEFAULT_FONT_NAME "Lucida Grande 13"
|
||||||
|
|
||||||
#define clutter_backend_osx_get_type _clutter_backend_osx_get_type
|
#define clutter_backend_osx_get_type _clutter_backend_osx_get_type
|
||||||
|
|
||||||
G_DEFINE_TYPE (ClutterBackendOSX, clutter_backend_osx, CLUTTER_TYPE_BACKEND)
|
G_DEFINE_TYPE (ClutterBackendOSX, clutter_backend_osx, CLUTTER_TYPE_BACKEND)
|
||||||
@ -47,6 +49,8 @@ static gboolean
|
|||||||
clutter_backend_osx_post_parse (ClutterBackend *backend,
|
clutter_backend_osx_post_parse (ClutterBackend *backend,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
ClutterSettings *settings = clutter_settings_get_default ();
|
||||||
|
|
||||||
CLUTTER_OSX_POOL_ALLOC();
|
CLUTTER_OSX_POOL_ALLOC();
|
||||||
/* getting standart dpi for main screen */
|
/* getting standart dpi for main screen */
|
||||||
NSDictionary* prop = [[NSScreen mainScreen] deviceDescription];
|
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 */
|
/* setting dpi for backend, it needs by font rendering library */
|
||||||
if (size.height > 0)
|
if (size.height > 0)
|
||||||
{
|
{
|
||||||
ClutterSettings *settings = clutter_settings_get_default ();
|
|
||||||
int font_dpi = size.height * 1024;
|
int font_dpi = size.height * 1024;
|
||||||
|
|
||||||
g_object_set (settings, "font-dpi", font_dpi, NULL);
|
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
|
static ClutterFeatureFlags
|
||||||
|
Loading…
Reference in New Issue
Block a user