With difficulty, I resolved the issue.
I tried xfig in Gnome, where it worked. But the monitor’s sizes and DPI were reported differently from those in KDE.
I found the sizes of the monitor in its manual. As it appears, both KDE and Gnome reported it wrongly. They were off by a few percent. The calculated DPI, however, was correct.
I installed again the Nvidia driver, let it create xorg.conf. There, I made two additions to Monitor section:
Section "Monitor"
Identifier "Monitor0"
DisplaySize 518 324 # In millimeters
Option "DPI" "94 x 94"
....
(DisplaySize and DPI can only be integer numbers; otherwise I would have given decimals for better accuracy.)
Rebooted, and xfig works!
This was a big deal of work me - I worked on it for several days. Tried nouveau, old Nvidia driver, variety of font installations, renaming and repositioning of fonts, issuing various commands to manipulate fonts, reinstalling xfig and other packages, removing the Nvidia driver, deleting xorg.conf, changing font DPI in KDE (this has no effect on xfig), reinstalling the OS, installing old version of xfig, etc.
However, there are a few questions for me left, only out of curiosity:
-
Where do KDE, Gnome and other components of graphical system pick up information about hardware, and why each picks up different numbers?
-
Why xfig worked correctly in Gnome even though the X server had slightly wrong information about the monitor?
-
Why is it that the error in monitor’s size was a few percent, but the error in fonts’ sizes was about 30%?
-
Is it so difficult to deal with fractional numbers in xorg.conf? Both sizes and DPI are by their nature irrational numbers. (This is a reminder for those who wrote the relevant parts of the X system ;).)
Thanks to all who helped. Especially useful was the xdpyinfo |egrep “resol|dime”
command.