#include <gtk/gtk.h>
#include <pango/pangocairo.h>

int
main (int argc, char **argv)
{
    int i;

    g_type_init ();

    for (i = 72; i <= 1200; i += 12)
    {
        int width, height;
        PangoContext* pango_context;
        PangoLayout* pango_layout;
        PangoCairoFontMap *fontmap;
        cairo_font_options_t *font_options;

        fontmap = pango_cairo_font_map_new ();
        pango_cairo_font_map_set_resolution (fontmap, i);	

        pango_context = pango_cairo_font_map_create_context (fontmap);
        pango_layout = pango_layout_new (pango_context);

        font_options = cairo_font_options_create ();
        cairo_font_options_set_hint_metrics (font_options, CAIRO_HINT_METRICS_OFF);
        cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE);

        pango_cairo_context_set_font_options (pango_context, font_options);

        cairo_font_options_destroy (font_options);

        pango_layout_set_text (pango_layout, "Hello World!", -1);
        pango_layout_get_size (pango_layout, &width, &height);
        printf ("%i ; %.1f ; %.1f\n", i, (double)width/(double)i, (double)height/(double)i);

        g_object_unref(fontmap);
        g_object_unref(pango_layout);
        g_object_unref(pango_context);
    }
}
