19 #include <pango/pango.h>
28 :
font_(pango_font_description_new())
30 pango_font_description_set_family(
font_, name.c_str());
31 pango_font_description_set_size(
font_,
size * PANGO_SCALE);
35 pango_font_description_set_style(
font_, PANGO_STYLE_ITALIC);
38 pango_font_description_set_weight(
font_, PANGO_WEIGHT_BOLD);
Small helper class to make sure the pango font object is destroyed properly.
p_font(const std::string &name, const unsigned size, font::pango_text::FONT_STYLE style)
PangoFontDescription * font_
p_font & operator=(const p_font &)=delete
p_font(const p_font &)=delete
PangoFontDescription * get()
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.