Being a client-server technology, in NX there two font servers involved:

a. The one that will be used by the X server, on the client

b. The one that will be used by the agent, on the NX server.

To change the one used by the X server on the client, please proceed in the usual way, modifying the configuration of the X server, for example in /etc/X11/xorg.conf or /etc/X11/XF86Config.

To change the font server used by the agent, please modify the AgentFontServer key in /usr/NX/etc/node.conf.

In order for the NX applications to use a font, the font must be available (and be compatible) on both the client and the server. Unfortunately the set of fonts that are available on the client are likely to differ from the set that is available on the server. The task of "publishing" the fonts that are shared between client and server is managed by the agent. At start-up, the agent queries the remote X server on the client to get the list of the available fonts. From that moment on, the agent will return to the application the only fonts that are known to be available on both the client and the server.

To be sure that both client and server share the same set of fonts it would be advisable to let the NX server and the X server on the client share the same X font server. This is easily achievable if client and server are on the same LAN but nearly impossible if they are connected over an Internet link. An easy solution is to tunnel the connection to the font server over the NX link. At the time of writing this functionality has not been implemented, yet, but it is planned for future releases.

Sharing the font server over the NX link would not solve all the problems. The overhead of handling these "X core fonts" (as opposed to RENDER fonts) would make NX far less usable due to the amount of round trips that would be exchanged between client and server to negotiate the use of these fonts. A much better solution is to let the applications running on the NX server use the advanced font handling capabilities built in the RENDER extension and its higher level companions, fontconfig, http://freedesktop.org/software/fontconfig , dealing with font discovery and configuration, and FreeType, http://freedesktop.org/Software/FreeType, dealing with font rendering and display. These technologies are designed to make it possible to describe a font on the application server, instead of relying on the description of glyphs being stored on the client. This will progressively reduce the need to keep the fonts locally on the X server (them being accessed by a local storage or by means of a connection to a remote font server).

Currently, most applications only use server-side fonts and only a few of them still rely on the X core fonts stored on the client. Most modern Unix GUIs (KDE, GNOME) are fully capable of using FreeType fonts, with the added benefit of improved visual enhancements, like better scaling and subpixel anti-aliasing. That said, some applications (usually older applications, not written to leverage the services provided by the modern Unix GUIs) mandate the presence of a given font and will not work if such a font is not found. The effect is that the application will work perfectly when run on the local console on the NX server, but will fail to start or will work unpredictably when run through a NX session.

What to do if an application needs a special font and this font is not available on the client? You can easily overcome this limitation by following the instructions below:

- On the Linux platform:

Copy the font in the directory that gets searched by your X server at the startup of the workstation. The directory is usually "/usr/X11R6/lib/X11/fonts/" and add a new FontPath key in the "/etc/X11/XF86Config" file on the client. Please refer to the instructions provided by your Linux distributor for information on the exact file contatining the X server configuration and its syntax.

- On the Windows platform:NOTE: This procedure only applies to NX Client 2.1.x and above for Windows. If you are using an earlier client, you must upgrade for this functionality to work.

Copy the font in the directory "C:\Program Files\NX Client for Windows\share\fonts\".

You will have to include the additional files that tell the X server which fonts are included in the directory. These files are usually named "fonts.dir", "fonts.alias" and "encodings.dir". In most cases it will be enough to copy the entire content of a font directory from the NX server installation to the client installation, including the additional files, to make it possible for the client to use the new font.