I need to create a Microsoft Word Mail Merge document in my Java Spring MVC application. But running it in Ubuntu server resulting in a document that missing the default font use in the document, which is the Calibri font. So I need to install the font in Ubuntu to make the document looks as expected.
Here what I need to do to install the font in my Ubuntu box. Starts by updating the repository package list to get latest packages information for upgrades or new package installation.
sudo apt-get update
Then install FontForge in our system. FontForge is a free and open source font editor, but in this case it will help to do the font conversion in the installation script on the upcoming step.
sudo apt-get install fontforge
Install the Microsoft Cabinet file un-packer. This is required for the next script to successfully install the fonts.
sudo apt-get install cabextract
The following script will install Microsoft Vista TrueType Fonts (TTF) in Ubuntu. It includes the following fonts, Calibri, Cambria, Candara, Consolas, Constantia, and Corbel.
wget https://gist.githubusercontent.com/maxwelleite/10774746/raw/ttf-vista-fonts-installer.sh -q -O - | sudo bash
Run the next command to see if the font successfully installed. You will see the Calibri fonts in the result if the fonts successfully installed.
fc-list | grep Calibri
Here are the list of installed Calibri fonts.
/usr/share/fonts/truetype/vista/calibriz.ttf: Calibri:style=Bold Italic
/usr/share/fonts/truetype/vista/calibrii.ttf: Calibri:style=Italic
/usr/share/fonts/truetype/vista/calibrib.ttf: Calibri:style=Bold
/usr/share/fonts/truetype/vista/calibri.ttf: Calibri:style=Regular
- How do I get number of each day for a certain month in Java? - September 8, 2024
- How do I get operating system process information using ProcessHandle? - July 22, 2024
- How do I sum a BigDecimal property of a list of objects using Java Stream API? - July 22, 2024
dearest sweet wayan sir,
Thankful for the nice words. your post also helped me. your are a nice person. may all love you
Like a charm! Thx!
Total lifesaver! This is a year’s worth of good deeds!
Thank you!
Thank you!
Super agradecido
muchas gracias, thy ^_^
Simple and working correctly. Thank you a lot!
Thank you! This worked when I slightly changed the link in the command to read: wget https://gist.githubusercontent.com/maxwelleite/10774746/raw/ttf-vista-fonts-installer.sh -q -O – | sudo bash
Worked very well. Thank you so much.
Installed on Linux Mint 22
Have a great day!
Hello from Brazil!
Thank you Wayan!
Worked perfectly.
Sent you a little contribution via Pay Pal. Lots of thank yous!
-bonelli
Thank you for your support.