summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/pangowin32tobmp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/pangowin32tobmp.c b/examples/pangowin32tobmp.c
index b657744f..2a945d70 100644
--- a/examples/pangowin32tobmp.c
+++ b/examples/pangowin32tobmp.c
@@ -50,10 +50,13 @@ calc_duration (GTimeVal *tv1, GTimeVal *tv0)
}
static int
-compare_font_family (PangoFontFamily** a,
- PangoFontFamily** b)
+compare_font_family (gconstpointer a,
+ gconstpointer b)
{
- return strcmp (pango_font_family_get_name (*a), pango_font_family_get_name (*b));
+ const PangoFontFamily** aa = (const PangoFontFamily **)a;
+ const PangoFontFamily** bb = (const PangoFontFamily **)b;
+
+ return strcmp (pango_font_family_get_name (*aa), pango_font_family_get_name (*bb));
}
int main (int argc, char **argv)
@@ -81,7 +84,7 @@ int main (int argc, char **argv)
* force initialization of built-in engines, otherwise
* the rendering get's really fast - too fast to work :-(
*/
- context = pango_win32_get_context ();
+ context = pango_font_map_create_context (pango_win32_font_map_for_display ());
if (argc == 1) /* No arguments given */
{
@@ -208,7 +211,6 @@ int main (int argc, char **argv)
glyphs = pango_glyph_string_new ();
item = pango_item_new ();
- item->analysis.shape_engine = pango_font_find_shaper (font, lang, s[0]);
item->analysis.font = g_object_ref (font);
pango_shape ( s, sizeof(s), &(item->analysis), glyphs);