Solution 1:
Connect to the internet and run this command below, to fix the error
sudo apt-get install --reinstall ttf-mscorefonts-installer
This will reinstall the package, and download the data files needed to configure the package. Wait for some times to finish downloading. The download size is approximately 4MB.
Solution 2:
Connect to the internet and go to this sourceforge link and download all the .exe
files there except wd97vwr32.exe
file.
Copy those files in your home directory.
Run this command to configure the package
sudo dpkg-reconfigure ttf-mscorefonts-installer
- This will ask you whether you have downloaded microsoft fonts or not. Use Tab to select OK, and hit Enter.
Then again you will be asked to enter the directory name for the downloaded files, Type the location of your home directory and use Tab to select OK, and hit Enter.
For example, if your login name is anwar
, the location will be /home/anwar
, because I copied the downloaded files there.
Done! you have successfully configured and setup the package.
Note: If the files cannot be downloaded due to 404 error, check the "Can't download?" section
What was the cause of the problem?
This package ttf-mscorefonts-installer
is used to download Microsoft's font files (those files are made freely available by Microsoft) from the Internet and install them. Since you must accept the EULA of Microsoft to use those font files, those fonts cannot be included in the package like other Free (Free as freedom) packages.
The problem was, somehow you get disconnected from Internet before downloading those files. So, is the message asking to download more data files.
Can't download?
If you can't download the files due to 404 errors, I have prepared a tar.gz archive of the downloaded contents. You can download it from this dropbox link and extract it to a folder. If you extract it to /tmp/
, you'll type that directory after the dpkg-reconfigure
command in Solution 2.
fontconfig employs a complete set of font substitution systems. There are different levels of font definition: font name and font families. Given a specific font, fontconfig uses the font of the same name if available, then seeks otherwise the font family of the same name. If there is still no match, it uses the standard font family definition as substitution, i.e. Sans, Sans-serif and Mono.
Ubuntu has the font family 'Verdana' defined in `/etc/fonts/conf.d/45-latin.conf', where 'Verdana' is set default to 'Sans-serif', which means Sans-serif is employed for 'Verdana' by default. But 'Verdana.ttf' would be used instead if it's installed.
In your system, the preferred font in the Sans-serif family is 'Liberation Sans', so fontconfig uses the 'Liberation Sans' as substitution for 'Verdana' provided there is no font of the same name, whereas uses 'Verdana.ttf' if it's in the search path. This explains what you've posted.
So the solution to your problem is that, you have to remap the font 'Verdana' to a different font, or to a group of fonts which assigns to 'Liberation Sans' the highest priority. (The latter case is recommended)
Open or create the file ~/.config/fontconfig/fonts.conf, append following:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test name="family"><string>Verdana</string></test>
<edit name="family" mode="prepend" binding="strong">
<string>Liberation Sans</string>
<string>Verdana</string>
</edit>
</match>
</fontconfig>
Note that ~/.fonts.conf is deprecated now, and if you already have user-defined fonts.conf, remove the header and footer and only keep the 'match' section. And it would be too long-winded to demonstrate the same workaround on 'Arial'. I'm sure you can find it on your own.
Best Answer
The ttf-mscorefonts-installer package allows for easy installation of the Microsoft True Type Core Fonts for the web.
Run
sudo apt-get install ttf-mscorefonts-installer
and accept the EULA, or else if you already have ttf-mscorefonts-installer installed and you didn't accept the EULA, then uninstall ttf-mscorefonts-installer and reinstall it like this:Use the Tab and Enter keys to accept the EULA in the Microsoft TrueType core fonts window that pops up. The terminal will output a new message each time it finishes downloading a new font. Wait a bit until the terminal tells you that it's finished downloading and installing the Microsoft TrueType core fonts.
As noted in package ttf-mscorefonts-installer 3.4+nmu1ubuntu2 fails to install/upgrade, the current 3.4 version of ttf-mscorefonts-installer searches for the font files in an incorrect network location. The consequence of this is that the core fonts are never installed. This problem occurs with Ubuntu 16.04 as of July, 2016. Current to October 11, 2017 the latest version of ttf-mscorefonts-installer is also 3.4 in Ubuntu 16.10 and Ubuntu 17.04 and the latest version of ttf-mscorefonts-installer is 3.6 in Ubuntu 17.10.
The Debian (upstream) version 3.6 of ttf-mscorefonts-installer searches for the font files in the correct network location, and will successfully install the core fonts. For more information about this fix see Failure to download extra data files - ttf-mscorefonts-installer