How to Install TrueType Microsoft Fonts in Fedora?

This guide will walk you through extracting TrueType fonts (.ttf and .ttc) and a license file from a Windows ISO image on your Fedora system using the terminal. This can be useful if you need specific fonts for compatibility or other reasons.

 

Prerequisites:

Windows ISO File: You'll need to have the Windows 10 or Windows 11 ISO file downloaded on your Fedora system. For this guide, we'll assume the ISO file is named Win11_24H2_English_x64.iso (or similar, adjust the name accordingly).


1. Download Windows ISO file. Navigate to the directory where you have saved the Windows ISO file.

 

2. Right click on empty space and then choose 'Open Terminal Here' or press Alt+Shift+F4 to open the terminal.

 

 

3. Run this following command into the terminal:

$ 7z e Win11_24H2_English_x64.iso sources/install.wim

7z : This is the command to run the 7-Zip tool.

e : This stands for "extract".

Win11_24H2_English_x64.iso : Replace this with the actual name of your Windows ISO file.

sources/install.wim : This specifies the file we want to extract from within the ISO.

This command will extract the install.wim file into the current directory (the same directory where your ISO file is located). This file contains the main Windows operating system image.

 

4. Now, run following command to extract the TrueType fonts and the license file from the install.wim file:

$ 7z e install.wim 1/Windows/{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf} -ofonts/

7z : The 7-Zip command.

e : Extract command.

install.wim : The file we are extracting from.

1/Windows/ : This specifies the path within the install.wim archive. 1 usually refers to the first image in the WIM file.

{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf} : This tells 7-Zip to extract: All files ending with .ttf or .ttc within the Windows/Fonts directory. The "*" is a wildcard meaning "any filename". The license.rtf file located in a specific nested directory structure under Windows/System32/Licenses/neutral. The "*" here act as wildcards for any subdirectory names at those levels.

-ofonts/ : This tells 7-Zip to create a new directory named fonts in the current directory and place the extracted files inside it.

 

5. Before copying the fonts, you might need to create the msfonts directory within your local fonts directory if it doesn't already exist. Run this command:

mkdir -p ~/.local/share/fonts/msfonts

mkdir : This command is used to create directories.

-p : This option tells mkdir to create parent directories if they don't exist.

~/.local/share/fonts/msfonts : This is the path to your local fonts directory where we will create a subdirectory named msfonts to store the extracted Windows fonts. The ~ symbol represents your home directory.

 

6. Now, copy the extracted fonts from the fonts directory (created in step 5) to the ~/.local/share/fonts/msfonts directory:

cp -r fonts/*.ttf ~/.local/share/fonts/msfonts/
cp -r fonts/*.ttc ~/.local/share/fonts/msfonts/

cp : This command is used to copy files and directories.

-r : This option is used to copy directories recursively (though in this case, we are copying files).

fonts/*.ttf : This selects all files ending with .ttf within the fonts directory.

fonts/*.ttc : This selects all files ending with .ttc within the fonts directory. 

~/.local/share/fonts/msfonts/ : This is the destination directory.

 

Congratulations! You have now successfully extracted and installed Windows fonts on your Fedora system. These fonts should now be available for use in your applications.


Comments

Popular posts from this blog

Install MakeMKV on Fedora 44