Commit acdcd0fd authored by Claes Sjofors's avatar Claes Sjofors

Flow, glow pango font free moved

parent 2819d5ce
......@@ -1241,7 +1241,6 @@ int FlowDrawGtk::text_pango( FlowCtx *ctx, int x, int y, char *text, int len,
PangoFontDescription *desc = pango_font_description_from_string( font_string( gc_type, size));
pango_layout_set_font_description( layout, desc);
pango_font_description_free( desc);
int w, h;
pango_layout_get_size( layout, &w, &h);
......@@ -1256,6 +1255,7 @@ int FlowDrawGtk::text_pango( FlowCtx *ctx, int x, int y, char *text, int len,
gdk_pango_renderer_set_drawable( GDK_PANGO_RENDERER(pr), 0);
gdk_pango_renderer_set_gc( GDK_PANGO_RENDERER(pr), 0);
g_object_unref( layout);
pango_font_description_free( desc);
g_object_unref( pctx);
return 1;
......@@ -1287,7 +1287,6 @@ int FlowDrawGtk::text_inverse_pango( FlowCtx *ctx, int x, int y, char *text, int
PangoFontDescription *desc = pango_font_description_from_string( font_string( gc_type, size));
pango_layout_set_font_description( layout, desc);
pango_font_description_free( desc);
int w, h;
pango_layout_get_size( layout, &w, &h);
......@@ -1297,6 +1296,7 @@ int FlowDrawGtk::text_inverse_pango( FlowCtx *ctx, int x, int y, char *text, int
gdk_pango_renderer_set_drawable( GDK_PANGO_RENDERER(pr), 0);
gdk_pango_renderer_set_gc( GDK_PANGO_RENDERER(pr), 0);
g_object_unref( layout);
pango_font_description_free( desc);
g_object_unref( pctx);
return 1;
......@@ -1328,7 +1328,6 @@ int FlowDrawGtk::text_erase_pango( FlowCtx *ctx, int x, int y, char *text, int l
PangoFontDescription *desc = pango_font_description_from_string( font_string( gc_type, size));
pango_layout_set_font_description( layout, desc);
pango_font_description_free( desc);
int w, h;
pango_layout_get_size( layout, &w, &h);
......@@ -1341,6 +1340,7 @@ int FlowDrawGtk::text_erase_pango( FlowCtx *ctx, int x, int y, char *text, int l
gdk_pango_renderer_set_drawable( GDK_PANGO_RENDERER(pr), 0);
gdk_pango_renderer_set_gc( GDK_PANGO_RENDERER(pr), 0);
g_object_unref( layout);
pango_font_description_free( desc);
g_object_unref( pctx);
return 1;
......@@ -1729,7 +1729,6 @@ int FlowDrawGtk::get_text_extent_pango( FlowCtx *ctx, const char *text, int len,
PangoFontDescription *desc = pango_font_description_from_string( font_string( gc_type, size));
pango_layout_set_font_description( layout, desc);
pango_font_description_free( desc);
int w, h;
pango_layout_get_size( layout, &w, &h);
......@@ -1740,6 +1739,7 @@ int FlowDrawGtk::get_text_extent_pango( FlowCtx *ctx, const char *text, int len,
gdk_pango_renderer_set_drawable( GDK_PANGO_RENDERER(pr), 0);
gdk_pango_renderer_set_gc( GDK_PANGO_RENDERER(pr), 0);
g_object_unref( layout);
pango_font_description_free( desc);
g_object_unref( pctx);
return 1;
......
......@@ -3547,7 +3547,6 @@ int GlowDrawGtk::text_pango( GlowWind *wind, int x, int y, char *text, int len,
PangoFontDescription *desc = pango_font_description_from_string( font_string( font_idx, font_type, size));
pango_layout_set_font_description( layout, desc);
pango_font_description_free( desc);
int width, height;
pango_layout_get_size( layout, &width, &height);
......@@ -3577,6 +3576,7 @@ int GlowDrawGtk::text_pango( GlowWind *wind, int x, int y, char *text, int len,
pango_context_set_matrix( pc, 0);
}
g_object_unref( layout);
pango_font_description_free( desc);
}
gdk_pango_renderer_set_drawable( GDK_PANGO_RENDERER(pr), 0);
gdk_pango_renderer_set_gc( GDK_PANGO_RENDERER(pr), 0);
......@@ -3633,7 +3633,6 @@ int GlowDrawGtk::text_erase_pango( GlowWind *wind, int x, int y, char *text, int
PangoFontDescription *desc = pango_font_description_from_string( font_string( font_idx, font_type, size));
pango_layout_set_font_description( layout, desc);
pango_font_description_free( desc);
int width, height;
pango_layout_get_size( layout, &width, &height);
......@@ -3668,6 +3667,7 @@ int GlowDrawGtk::text_erase_pango( GlowWind *wind, int x, int y, char *text, int
px, py, pw, ph);
g_object_unref( layout);
pango_font_description_free( desc);
gdk_pango_renderer_set_drawable( GDK_PANGO_RENDERER(pr), 0);
gdk_pango_renderer_set_gc( GDK_PANGO_RENDERER(pr), 0);
......@@ -3713,7 +3713,6 @@ int GlowDrawGtk::get_text_extent_pango( const char *text, int len,
PangoFontDescription *desc = pango_font_description_from_string( font_string( font_idx, font_type, size));
pango_layout_set_font_description( layout, desc);
pango_font_description_free( desc);
int lwidth, lheight;
pango_layout_get_size( layout, &lwidth, &lheight);
......@@ -3730,6 +3729,7 @@ int GlowDrawGtk::get_text_extent_pango( const char *text, int len,
*descent = (int)(FONT_DESCENT * lheight / PANGO_SCALE);
g_object_unref( layout);
pango_font_description_free( desc);
gdk_pango_renderer_set_drawable( GDK_PANGO_RENDERER(pr), 0);
gdk_pango_renderer_set_gc( GDK_PANGO_RENDERER(pr), 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment