Being relatively new to X11, I've been trying to make font rendering painless in my C example program. After giving up on making Xtf work reliabily, pangocairo seemed like the next best choice. I have encountered however an issue: pango doesn't always recognize the font description from a string. The following call does create a valid PangoFontDescription that will show text to a cairo x11 surface, however using any other font family that is not Sans or Serif won't display anything.
desc = pango_font_description_from_string ("Sans Bold 27");
The following one doesn't work no matter what sizes or weights are set up.
desc = pango_font_description_from_string ("Fixed 14");
What bugs me the most, the utility pango-view will create a perfectly working output of all descriptions given, even though they won't work in my pangocairo example.
pango-view --no-display --output out.png --text 'Test' --font 'Fixed 14'
Creating a new empty PangoFontDescription and setting up family, size and weight separately has the same exact issue as above with pango_font_description_from_string.
I'm really wondering what the issue could be, and the pango documentation hasn't really been helpful on this regard.