Loading a font from a file to pango?
问题 I have a code uses Cairo and Pango to create an image : #include<stdio.h> #include<cairo.h> #include<pango/pangocairo.h> #define IMAGE_WIDTH 650 #define IMAGE_HEIGHT 150 #define TEXT "HELLO WORLD" #define FONT "MizuFontAlphabet Normal 40" /* * $ gcc $(pkg-config pangocairo cairo --cflags --libs) file.c */ int main(int argc , char** argv) { cairo_surface_t *surface; cairo_t *cr; PangoLayout *layout; PangoFontDescription *desc; PangoRectangle extents; surface = cairo_image_surface_create(CAIRO