In this article, we will discuss how to create a favicon.ico with Ubuntu distribution. We would illustrate it with the help of Inkscape and Imagemagick packages. First, we will discuss the installation process for both the packages. To continue with the installation process, you should have access to superuser privileges. In case if you don’t have one, then contact your System Administrator for assistance.
Install Inkscape and Imagemagick in Ubuntu
Run the following in terminal –
sudo apt install inkscape imagemagick
The above command will install package – Inkscape and Imagemagick. Through Inkscape package, we will create a Scalable Vector Graphic thereafter we will convert the .svg extension file to .ico through convert command.
Create a Scalable Vector Graphic through Inkscape
You could design virtually anything with Inkscape. But, for the purpose of this article we will be creating a text favicon. Open Inkscape and you will taken to blank page. You would also notice a toolbar on the left hand side, we need to click on the icon provided on the toolbar –
This is used to create and edit text objects in Inkscape. Alternately, you could press F8 through keyboard. Thereafter, create a rectangular box in the default empty space.
Write anything you would like, and select the text. Just below the menu bar, you would notice that you could change the font of your text. We have chosen the font – TeX Gyre Chorus. Choose one as per your liking and make it bold, italic etc.
Thereafter, press F1 to select and transform the text object.
Notice, you can resize your text object now. Furthermore, we will color the text object using the option Fill and Stroke. This could be invoked through F8 keyboard shortcut. We have used the color #FF6600.
The text object should be converted to path, this could be done through shortcut key Ctrl+Shft+C & Ctrl+Shft+R is to resize page to selection. And, save it – Ctrl+Shft+S. Save your file as input.svg.
Convert .svg to .ico
To convert input.svg file to favicon.ico, you need to run the following in terminal –
convert -background transparent -define icon:auto-resize=192 input.svg favicon.ico
We have chosen background as transparent, icon size as 192. You can choose icon size as per your requirements.
In conclusion, we have discussed how to create and convert a scalable vector graphic to favicon.ico with Ubuntu distribution using packages Inkscape and Imagemagick.