summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2019-08-25 18:43:46 +0300
committerAlexander Larsson <alexl@redhat.com>2019-08-25 18:43:46 +0300
commitba21a3cb8f70566aac1cc3f5ed63a2d81c609630 (patch)
tree89afc58d392293dfa357cd8e2f4a57943f3388b7 /pango/pango-context.c
parentfb72c7dd3e074f28e7cfa98388a87f1aaffc12ee (diff)
downloadpango-ba21a3cb8f70566aac1cc3f5ed63a2d81c609630.tar.gz
Don't depend on glib 2.60 symbols at runtime
The G_TYPE_UNICODE_STRING type was added in 2.60, which broke applications using older glib versions (such as matlab). The only usecase was a warning message anyway, so we just avoid using it.
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 99fa454a..a64eb79f 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1488,17 +1488,19 @@ itemize_state_process_run (ItemizeState *state)
{
/* If no font was found, warn once per fontmap/script pair */
PangoFontMap *fontmap = state->context->font_map;
- const char *script_name = g_enum_to_string (G_TYPE_UNICODE_SCRIPT, state->script);
+ char *script_tag = g_strdup_printf ("g-unicode-script-%d", state->script);
- if (!g_object_get_data (G_OBJECT (fontmap), script_name))
+ if (!g_object_get_data (G_OBJECT (fontmap), script_tag))
{
- g_warning ("failed to choose a font, expect ugly output. script='%s'",
- script_name);
+ g_warning ("failed to choose a font, expect ugly output. script='%d'",
+ state->script);
- g_object_set_data_full (G_OBJECT (fontmap), script_name,
+ g_object_set_data_full (G_OBJECT (fontmap), script_tag,
GINT_TO_POINTER (1), NULL);
}
+ g_free (script_tag);
+
font = NULL;
}
itemize_state_fill_font (state, font);