Xming

Xming Fonts

Adding fonts

To add new fonts copy the required *.TTF font files to directory fonts/TTF (or different font types e.g. gzip compressed .pcf files). Warning: check you are licensed to copy the fonts first! Run mkfontscale, from the Xming install directory, to create a fonts.dir file, to make the fonts usable, like this
>cd C:\Program Files\Xming
>mkdir fonts\TTF     if directory TTF doesn't exist and then copy additional *.TTF files into it
>mkfontscale fonts/TTF            makes a fonts.scale file in directory fonts\TTF
>mkfontscale -b -s -l fonts/TTF   makes a fonts.dir file from fonts.scale
Better still just simply access Windows System TrueType fonts directly, without copying, by creating harmless fonts.scale and fonts.dir text files in the Windows System fonts directory (typically C:\Windows\Fonts), like this
>mkfontscale C:/Windows/Fonts
>mkfontscale -b -s -l C:/Windows/Fonts   ignore the 'Couldn't...fon' messages
Note: You will have to run the Windows Command Prompt (cmd.exe) as Administrator to be able to write to the C:\Windows\Fonts directory with latest Windows versions.

Additionally you have to tell Xming to use a font directory not in the default font path (i.e. not in misc, TTF, 75dpi or 100dpi) by adding the font directory to the default font path using the font-dirs file in the install directory

# In file font-dirs make sure you have any font path additions, before startup
C:\Windows\Fonts
or by appending to the default font path during runtime (or prepending to put the new fonts first in the search order)
>xset fp+ C:/Windows/Fonts             append or
>xset +fp C:/Windows/Fonts             prepend
or by including the font directory at startup like this (you have to include any defaults you need)
>Xming -fp "C:/Program Files/Xming/fonts/misc/,C:/Program Files/Xming/fonts/TTF/,
  C:/Program Files/Xming/fonts/75dpi/,C:/Program Files/Xming/fonts/100dpi/,
  C:/Windows/Fonts" -resize -multiwindow -clipboard
Note: Type1 PS fonts are no longer supplied or supported.

Font size

Altering the font path search order can sometimes be used to alter font size, e.g. putting 100dpi fonts in front of 75dpi fonts can make fonts appear larger on a some monitors. You can also play with the -dpi parameter (e.g. -dpi 100 makes some fonts larger for me). Plus the -dpi auto option matches the xserver to the native Windows resolution dots per inch. Hint: use xdpyinfo to examine actual screen resolutions.

It is however better to adjust font size in the client application. The render size of some fonts on Windows is different from the render size on a Linux desktop. So, remote client applications rendered by Xming may display with smaller or larger fonts than you expect. When you adjust the application be aware that you are adjusting its configuration on the remote host to fix a problem on the local display.

fonts.alias

Some applications can't manage only with the data supplied in the fonts.scale and fonts.dir files and need more traditional X names in an alias file. To create a fonts.alias file you could use the usual mkfontalias.py script by copying the fonts.dir file onto a machine with Python (the methods above produce lower case in the fonts.dir file so the script needs altering see my mkfontalias.py) and then grep out the aliases you want and copy the fonts.alias file back to the Windows machine %WINDIR%\Fonts directory
$ python my_mkfontalias.py
$ grep 'iso8859-1"' fonts.alias > new_alias
$ grep 'iso8859-15"' fonts.alias >> new_alias
$ cat new_alias > fonts.alias
In some cases, applications rely upon the fonts named 'fixed' or something like '9x18'. In these cases, it is important that the fonts.alias file specifies the correct character set. Users of iso8859-X encodings, where X is not 1, should modify the fonts.alias files in directories 75dpi, 100dpi and misc by replacing the iso8859-1 string with the proper encoding name. This can be accomplished on a machine with sed, substituting the proper value for <X>
$ sed -i 's,iso8859-1\( \|$\),iso8859-<X>\1,g' fonts.alias

List fonts

To list the fonts resourced by an X server use xlsfonts.

To see the font path use the xset q option.

Using a remote X font server

To use a remote [WWW]X font server, if one is available on your network, start Xming with option -fp
-fp tcp/<IP address or name of font server>:7100
I use this option all the time, thus avoiding the need to install the Xming-fonts package.

Alternatively you could add an entry to your font-dirs file

tcp/<IP address or name of font server>:7100
Linux hint: many distros disable an xfs (X font server) from TCP listening. In your /etc/X11/fs/config file network enable an xfs (by commenting out the no-listen line) like this
# no-listen = tcp
you will then have to restart the xfs service.

Antialiasing

The core X fonts protocol uses names such as '-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-1'. These fonts are rendered by an X server without antialiasing.
Xft provides antialiased font rendering through FreeType, and fonts are controlled from the client-side using fontconfig.

Table of contents

  1. Adding fonts
  2. Font size
  3. fonts.alias
  4. List fonts
  5. Using a remote X font server
  6. Antialiasing
Creative Commons License
The [WWW]Xming website, documentation and images are licensed under a
[WWW]Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales License.
Copyright © 2005-2014 Colin Harrison All Rights Reserved