windowspango

Pango-WARNING **: couldn't load font ouldn't load font "Times Not-Rotated 18", falling back to "Sans Not-Rotated 10px", expect ugly output


I am trying to run on package/software “KUPDAP (Kyoto University Plasma Dispersion Analysis Package)”, which can be downloaded from http://space.rish.kyoto-u.ac.jp/software/ (Download executable file (Windows)). It is a winrar file. After extracting, one can see file named “kupdap”. If I click that one, a window will appear like these:

enter image description here

If you wait for some time or click close, then the windows changes into:

enter image description here

In this GUI, I can feed my data. But the problem is what is seen in the background- in the command prompt, an error message appears “ (kupdap.exe:12988) Pango-WARNING **: couldn't load font ouldn't load font "Times Not-Rotated 18", falling back to "Sans Not-Rotated 10px", expect ugly output”. Due to this the program is not running. Honestly, I have never ever heard about pango. I am guessing that it has something to do with fonts in the system. I am also attaching the screenshot of the fonts (not all) in my system:

enter image description here

I have gone through some articles listed here: https://github.com/lovell/sharp/issues/1162 , but these things go over my head.

Could anybody help me out what is wrong and how to fix it? BTB, I am using Windows 10.

Thanks in advance.


Solution

  • The problem is that kupdap is using a default font hardcoded to Times. The snippet below is copied from the beginning of the main function in kupdap_source\visual\main1.c:

    int main(int argc, char *argv[]){
      GtkWidget *window, *vbox;
      PangoFontDescription *p;
      
      p = pango_font_description_from_string("Times 18"); // <--- this is what triggers error
      gtk_init(&argc, &argv);
    
      // create credit
      GtkWidget *credit;
      credit =  gtk_about_dialog_new();
    

    However, a default Windows installation has no font named Times, which is what causes the Pango-WARNING. There is a stock Times New Roman font, instead, but pango appears to be doing an exact string match, and ignores it.

    Possible workarounds: