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:
If you wait for some time or click close, then the windows changes into:
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:
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.
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
.