summaryrefslogtreecommitdiff
path: root/clutter/clutter-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'clutter/clutter-main.c')
-rw-r--r--clutter/clutter-main.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index 3b9385acb..1a337c002 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -764,86 +764,6 @@ clutter_get_text_direction (void)
return dir;
}
-static void
-update_pango_context (ClutterBackend *backend,
- PangoContext *context)
-{
- ClutterSettings *settings;
- PangoFontDescription *font_desc;
- const cairo_font_options_t *font_options;
- gchar *font_name;
- PangoDirection pango_dir;
- gdouble resolution;
-
- settings = clutter_settings_get_default ();
-
- /* update the text direction */
- if (clutter_text_direction == CLUTTER_TEXT_DIRECTION_RTL)
- pango_dir = PANGO_DIRECTION_RTL;
- else
- pango_dir = PANGO_DIRECTION_LTR;
-
- pango_context_set_base_dir (context, pango_dir);
-
- g_object_get (settings, "font-name", &font_name, NULL);
-
- /* get the configuration for the PangoContext from the backend */
- font_options = clutter_backend_get_font_options (backend);
- resolution = clutter_backend_get_resolution (backend);
-
- font_desc = pango_font_description_from_string (font_name);
-
- if (resolution < 0)
- resolution = 96.0; /* fall back */
-
- pango_context_set_font_description (context, font_desc);
- pango_cairo_context_set_font_options (context, font_options);
- pango_cairo_context_set_resolution (context, resolution);
-
- pango_font_description_free (font_desc);
- g_free (font_name);
-}
-
-PangoContext *
-_clutter_context_get_pango_context (void)
-{
- ClutterMainContext *self = _clutter_context_get_default ();
-
- if (G_UNLIKELY (self->pango_context == NULL))
- {
- PangoContext *context;
-
- context = _clutter_context_create_pango_context ();
- self->pango_context = context;
-
- g_signal_connect (self->backend, "resolution-changed",
- G_CALLBACK (update_pango_context),
- self->pango_context);
- g_signal_connect (self->backend, "font-changed",
- G_CALLBACK (update_pango_context),
- self->pango_context);
- }
- else
- update_pango_context (self->backend, self->pango_context);
-
- return self->pango_context;
-}
-
-PangoContext *
-_clutter_context_create_pango_context (void)
-{
- CoglPangoFontMap *font_map;
- PangoContext *context;
-
- font_map = clutter_context_get_pango_fontmap ();
-
- context = cogl_pango_font_map_create_context (font_map);
- update_pango_context (clutter_get_default_backend (), context);
- pango_context_set_language (context, pango_language_get_default ());
-
- return context;
-}
-
/**
* clutter_main_quit:
*