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.scaleBetter 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
>cd C:\Program Files\Xming >mkfontscale C:/Windows/Fonts >mkfontscale -b -s -l C:/Windows/Fonts ignore the many 'Couldn't...fon' messagesNote: 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, 100dpi or 75dpi) 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\Fontsor 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 prependor 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/100dpi/,C:/Program Files/Xming/fonts/75dpi/, C:/Windows/Fonts" -multiwindow -clipboardNote: 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 75dpi fonts in front of 100dpi fonts can make fonts appear smaller on some monitors. You can also play with the -dpi parameter (e.g. -dpi 144 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.aliasIn 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 X font server, if one is available on your network, start Xming with option -fp-fp tcp/<IP address or name of font server>:7100I 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>:7100Linux 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 = tcpyou 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.
Blurry bitmap fonts and display scaling override
Clients that use legacy, fixed-point, non-scalable bitmap fonts may appear blurry with Windows 10 (version ≥ 1803) on ultra-high resolution devices. If you cannot change to scalable vector fonts, like TTF, then try enabling 'Override high DPI scaling behaviour. Scaling performed by: Application' in the right-click 'Compatibility > Change high DPI settings > High DPI scaling override' properties of Xming.exe.The change to the properties of Xming.exe, described above, can also be used to show X clients without any display scaling i.e. to override Windows 10 display scaling when set other than 100%.
Table of contents
- Adding fonts
- Font size
- fonts.alias
- List fonts
- Using a remote X font server
- Antialiasing
- Blurry bitmap fonts and display scaling override
The Xming website, documentation and images are licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales License.
Copyright © 2005-2024 Colin Harrison All Rights Reserved