21 #include <pangomm/layout.h>
33 , _char_pixel_width (-1)
34 , _char_pixel_height (-1)
35 , _char_avg_pixel_width (-1)
46 Glib::RefPtr<Pango::Context> pc = Glib::wrap (gdk_pango_context_get_for_screen (gdk_screen_get_default()));
47 Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (pc);
49 layout->set_font_description (
_font);
52 std::string x =
_(
"ABCDEFGHIJLKMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
54 layout->get_pixel_size (w, h);
66 std::map<std::string,EmScale>::iterator i =
_emscales.find (fd.to_string());
EmScale(const Pango::FontDescription &)
unsigned int _char_pixel_height
void recalc_char_pixel_geometry()
static std::map< std::string, EmScale > _emscales
static EmScale & by_font(const Pango::FontDescription &)
unsigned int _char_pixel_width
float _char_avg_pixel_width
Pango::FontDescription _font