[sushi] main: don't customize clutter font settings
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] main: don't customize clutter font settings
- Date: Mon, 30 Apr 2012 21:43:14 +0000 (UTC)
commit d7cb04a4f709a57bf20679ae7c0feff5dc11bdda
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Apr 30 17:39:48 2012 -0400
main: don't customize clutter font settings
This shouldn't be needed anymore, and is here only because it was copied
from the-board when the project was first started.
src/main.c | 55 -------------------------------------------------------
1 files changed, 0 insertions(+), 55 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index ea71cfe..58adfb2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -67,45 +67,6 @@ parse_options (int *argc, char ***argv)
}
static void
-update_font_options (GtkSettings *settings)
-{
- ClutterBackend *backend;
- const cairo_font_options_t *options;
- cairo_antialias_t antialias_mode;
- gint antialias;
-
- /* Disable text mipmapping; it causes problems on pre-GEM Intel
- * drivers and we should just be rendering text at the right
- * size rather than scaling it. If we do effects where we dynamically
- * zoom labels, then we might want to reconsider. */
- clutter_set_font_flags (clutter_get_font_flags () & ~CLUTTER_FONT_MIPMAPPING);
-
- backend = clutter_get_default_backend ();
- options = clutter_backend_get_font_options (backend);
-
- g_object_get (settings,
- "gtk-xft-antialias", &antialias,
- NULL);
-
- /* We don't want to turn on subpixel anti-aliasing; since Clutter
- * doesn't currently have the code to support ARGB masks,
- * generating them then squashing them back to A8 is pointless. */
- antialias_mode = (antialias < 0 || antialias) ? CAIRO_ANTIALIAS_GRAY
- : CAIRO_ANTIALIAS_NONE;
-
- cairo_font_options_set_antialias ((cairo_font_options_t *) options,
- antialias_mode);
-}
-
-static void
-settings_notify_cb (GtkSettings *settings,
- GParamSpec *pspec,
- gpointer data)
-{
- update_font_options (settings);
-}
-
-static void
register_all_viewers (GjsContext *ctx)
{
GDir *dir;
@@ -145,7 +106,6 @@ int
main (int argc, char **argv)
{
GjsContext *js_context;
- GtkSettings *settings;
GError *error;
#ifdef GDK_WINDOWING_X11
@@ -162,21 +122,6 @@ main (int argc, char **argv)
parse_options (&argc, &argv);
js_context = gjs_context_new_with_search_path (NULL);
- settings = gtk_settings_get_default ();
-
- g_object_connect (settings,
- "signal::notify::gtk-xft-dpi",
- G_CALLBACK (settings_notify_cb), NULL,
- "signal::notify::gtk-xft-antialias",
- G_CALLBACK (settings_notify_cb), NULL,
- "signal::notify::gtk-xft-hinting",
- G_CALLBACK (settings_notify_cb), NULL,
- "signal::notify::gtk-xft-hintstyle",
- G_CALLBACK (settings_notify_cb), NULL,
- NULL);
-
- update_font_options (settings);
-
error = NULL;
register_all_viewers (js_context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]