Broken kerning with pangocairo
Creating a simple PDF with Pangocairo has broken kerning. Exporting the same text from LibreOffice produces proper results. I used LO via Flatpak so theoretically it could use a different Gentium file but it seems unlikely.
I have attached the exported PDF files as well as a simple image showing the differences. The source code to generate the file is below:
#include<pango/pangocairo.h>
#include<cairo.h>
#include<cairo-pdf.h>
int main(int argc, char **argv) {
cairo_surface_t *surf = cairo_pdf_surface_create("pangocairo-export.pdf", 595, 842);
cairo_t *cr = cairo_create(surf);
cairo_move_to(cr, 40, 40);
PangoLayout *layout = pango_cairo_create_layout(cr);
PangoFontDescription *desc = pango_font_description_from_string("Gentium");
pango_font_description_set_absolute_size(desc, 10*PANGO_SCALE);
pango_layout_set_font_description(layout, desc);
pango_layout_set_text(layout, "Yet", -1);
pango_cairo_update_layout(cr, layout);
pango_cairo_show_layout(cr, layout);
g_object_unref(G_OBJECT(layout));
pango_font_description_free(desc);
cairo_destroy(cr);
cairo_surface_destroy(surf);
return 0;
}