I work with both windows and ubuntu and I edit my documents from both of these OS. I want all my formatting to be consistent but, there are many fonts in windows which are not present in ubuntu. This makes editing word files a boaring task as I have to keep changing the fonts whenever I change the OS or use a font which is available in both the OS. There are also some web sites which require me to install their font to show up in correct format.
We can install any font in ubuntu by following these simple steps. To start with we need the font file to install. If it is a fovourite font from Windows just copy the font file from the windows fonts directory into a memory stick and copy it to your home directory in ubuntu. Then open up a terminal.
- Create a directory to hold our fonts – sudo mkdir -p /usr/local/share/fonts/truetype
- Change to the directory we have created – sudo cd /usr/local/share/fonts/truetype
- Copy the font file – sudo cp ~/<font-file-name>.ttf .
- Rebuild font cache – sudo fc-cache -f -v
We could see that the last command updates the font-cache by printing a lot of messages to the console. We are done. Now open the website which asked for the font, it should open with correct formatting. If we open a document to edit we could find the font we have just installed from the fonts drop down.