#include <cairo/cairo.h>
#include <pango/pango.h>
#include <pango/pangocairo.h>
#include <stdio.h>


int
main(int argc, const char **argv)
{
    if (argc != 2) {
        fprintf(stderr, "Usage: %s <output-file>\n", argv[0]);
        return 1;
    }

    const char *output_path = argv[1];

    cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 709, 236);

    cairo_t *ctx = cairo_create(surface);

    cairo_set_source_rgb(ctx, 1.0, 1.0, 1.0);
    cairo_paint(ctx);

    cairo_scale(ctx, 23.622, 23.622);

    PangoFontDescription *font_desc = pango_font_description_new();
    pango_font_description_set_family(font_desc, "Ubuntu Condensed");
    pango_font_description_set_absolute_size(font_desc, 5 * PANGO_SCALE);

    PangoLayout *layout = pango_cairo_create_layout(ctx);
    pango_layout_set_font_description(layout, font_desc);
    pango_layout_set_text(layout, "FaforgTa", -1);
    pango_layout_set_width(layout, 10000);

    cairo_set_source_rgb(ctx, 0.0, 0.0, 0.0);
    pango_cairo_show_layout(ctx, layout);

    cairo_surface_write_to_png(surface, output_path);

    return 0;
}
