The DPI is calculated based on the size in millimeters of the screen and the width and height. We have verified that the DPI reported by nxagent to its clients always matches the DPI reported by the real X server, but still we get different fonts inside nxagent and on the real display.
You can test this yourself by using the xdpyinfo utility, looking at the resolution field.
This problem seems rather to have to do with the way startkde initializes the session. In fact, by running a GNOME session and, later on, a KDE session on the same display, the KDE fonts get the correct size.
The suggested workaround, even if it may be not applicable in all cases, is editing the Xft.dpi parameter in the ~/.Xresources file, setting for example:
Xft.dpi: 96
More information about DPI can be found at:
http://www.scanline.ca/dpi/
Starting from NX 2.0.0, a new key, i.e. DEFAULT_X_DPI, is available in the node configuration file to set the default DPI of the X server to the specified value. You can refer at the following Feature Request:
http://www.nomachine.com/fr/view.php?id=FR05D01375