Commit e7ef7b70 authored by Kjell Ahlstedt's avatar Kjell Ahlstedt
Browse files

Context::get_font_map(): Fix reference count

pango_context_get_font_map() returns "(transfer none)".
See https://mail.gnome.org/archives/gtkmm-list/2022-February/msg00031.html
parent a192e7fc
Pipeline #368745 failed with stages
in 11 minutes
......@@ -35,7 +35,7 @@ std::vector<Glib::RefPtr<FontFamily>> Context::list_families() const
Pango::FontMetrics Context::get_metrics(const FontDescription& desc) const
{
return FontMetrics(pango_context_get_metrics(const_cast<PangoContext*>(gobj()), desc.gobj(), 0));
return FontMetrics(pango_context_get_metrics(const_cast<PangoContext*>(gobj()), desc.gobj(), nullptr));
}
struct ItemTraits
......@@ -57,7 +57,7 @@ std::vector<Item> Context::itemize(const Glib::ustring& text, const AttrList& at
return ListHandler_Item::list_to_vector(
pango_itemize(const_cast<PangoContext*>(gobj()),
text.c_str(), 0, text.bytes(),
const_cast<PangoAttrList*>(attrs.gobj()), 0),
const_cast<PangoAttrList*>(attrs.gobj()), nullptr),
Glib::OWNERSHIP_DEEP);
}
......@@ -89,4 +89,3 @@ Matrix Context::get_matrix() const
}
} /* namespace Pango */
......@@ -86,8 +86,8 @@ public:
_WRAP_METHOD(void set_font_map(const Glib::RefPtr<FontMap>& font_map), pango_context_set_font_map)
_WRAP_METHOD(Glib::RefPtr<FontMap> get_font_map(), pango_context_get_font_map)
_WRAP_METHOD(Glib::RefPtr<const FontMap> get_font_map() const, pango_context_get_font_map)
_WRAP_METHOD(Glib::RefPtr<FontMap> get_font_map(), pango_context_get_font_map, refreturn)
_WRAP_METHOD(Glib::RefPtr<const FontMap> get_font_map() const, pango_context_get_font_map, refreturn, constversion)
_WRAP_METHOD(guint get_serial() const, pango_context_get_serial)
......@@ -172,4 +172,3 @@ public:
};
} /* namespace Pango */
Supports Markdown
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