Wine uses fontconfig
to manage distro provided fonts.
To hide all system / distro installed fonts (/usr/share/fonts/... etc.) use a local fontconfig configuration file.
Content of example wine_no_system_fonts with no font paths configured:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
</fontconfig>
Export the environment variable FONTCONFIG_FILE
with the custom fontconfig file path in current shell or prefix all commands with it:
export FONTCONFIG_FILE=$PWD/wine_no_system_fonts.conf
Check that fontconfig
no longer lists fonts:
fc-list : file
Re-create the WINEPREFIX as Wine does persist / caches system fonts data (paths to files) in registry.
rm -rf ~/.wine
wineboot -u
For testing, start wordpad
and check that only Wine "builtin" fonts are listed in drop-down font list:
wine wordpad
Thanks, this worked for me. However, to make it more convenient to use, I patched all the commands that are related to wine.