2

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.

sreeraj t
  • 169
  • 3
  • 12

1 Answers1

3

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:

  • change "Times 18" to "Times New Roman 18" (or another valid font name) in the source code and rebuild the program;

  • install a font named Times in Windows, so that pango finds it;

  • hex-edit the kupdap.exe binary and replace the unique occurrence of the text Times with the 5-letter name of another font that is installed e.g. Arial.

dxiv
  • 16,984
  • 2
  • 27
  • 49
  • Dear @dxiv , Many thanks for taking time to look into this matter. I did not know all these. I guess you have used “kupdap_source” rather than “kupdap_binary_windows”. In anyway, what I did was I opened “kupdap” application file in notepad++ and saw that there is “Times 18” and then changed to “Arial 18” (I am not sure whether this is a good idea). Then there was no warning. I also tried another method: installed fonts as you have mentioned. In either way the warning message did not appear... 1/2 – sreeraj t Dec 22 '20 at 05:04
  • However, I am facing another issue, which is when I click the dropdown menu in species to add another one, the windows suddenly disappear. Any thoughts on that? Thank you 2/2 – sreeraj t Dec 22 '20 at 05:04
  • 1
    @sreerajt Your hex-edit should be fine, as long as the size of the `.exe` stayed the same. I found the `"Times 18"` tidbit by snooping into the source code, but I did not build from sources since that requires several other dependencies. Beyond that, I don't really know what the program does or how it's supposed to be used, so that would be a question for others who happen to be familiar with it. – dxiv Dec 22 '20 at 05:16