{"id":51499,"date":"2015-08-10T01:30:10","date_gmt":"2015-08-10T05:30:10","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=51499"},"modified":"2017-07-25T11:01:42","modified_gmt":"2017-07-25T15:01:42","slug":"joomla-3-x-how-to-add-and-use-custom-fonts","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/joomla-3-x-how-to-add-and-use-custom-fonts.html","title":{"rendered":"Joomla 3.x. How to add and use custom fonts"},"content":{"rendered":"<p>\r\n<p>This tutorial shows how to add any custom font to your Joomla site and apply it to text.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=XDs9mIl4ODU?width=1280&amp;height=720\" rel=\"prettyPhoto\">Joomla 3.x. How to add and use custom fonts<\/a><\/p>\r\n<p>In order to apply a custom font to your site&#8217;s text, you should perform the following:<\/p>\r\n<ol>\r\n<li>\r\n<p>Download a font from the Internet or just copy it from your system folder. For example, Windows stores its fonts in the <strong>C:\\Windows\\Fonts<\/strong> directory. Make sure the font format is either <strong>TTF<\/strong> (TrueType Font) or <strong>OTF<\/strong> (OpenType Font).<\/p>\r\n<\/li>\r\n<li>\r\n<p>Go to <a href=\"http:\/\/www.font2web.com\/\" target=\"_blank\" rel=\"nofollow\">Font 2 Web<\/a> website, choose the font file from your local system and hit the <strong>CONVERT&amp;DOWNLOAD<\/strong> button:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-1.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-1.jpg-300x300.jpg\" alt=\"Joomla_3.x._How_to_add_and_use_a_custom_font-1.jpg\" width=\"300\" height=\"300\" class=\"aligncenter size-medium wp-image-51500\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-1.jpg-300x300.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-1.jpg-150x150.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-1.jpg-164x164.jpg 164w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-1.jpg.jpg 600w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>You&#8217;ll get a zip archive. We need the <strong>fonts<\/strong> folder and <strong>fonts.css<\/strong> file that are inside the archive:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-2.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-2.jpg-300x85.jpg\" alt=\"Joomla_3.x._How_to_add_and_use_a_custom_font-2.jpg\" width=\"300\" height=\"85\" class=\"aligncenter size-medium wp-image-51501\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-2.jpg-300x85.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-2.jpg-150x42.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-2.jpg.jpg 710w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>Upload the contents of the <strong>fonts<\/strong> folder to the <strong>templates\/themeXXXX\/fonts\/<\/strong> directory on your server. Make sure the files have the permissions set to <strong>644<\/strong>:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-3.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-3.jpg-300x169.jpg\" alt=\"Joomla_3.x._How_to_add_and_use_a_custom_font-3.jpg\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-51502\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-3.jpg-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-3.jpg-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-3.jpg-1024x576.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-3.jpg.jpg 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>Open up the <strong>fonts.css<\/strong> file, locate <strong>url()<\/strong> attributes and correct their URLs from <strong>fonts\/XXX.xxx<\/strong> to <strong>..\/fonts\/XXX.xxx<\/strong> (add two periods and a forward slash at the beginning). You also should change the <strong>font-family<\/strong> attribute to coincide with the names of files:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-4.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-4.jpg-300x113.jpg\" alt=\"Joomla_3.x._How_to_add_and_use_a_custom_font-4.jpg\" width=\"300\" height=\"113\" class=\"aligncenter size-medium wp-image-51504\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-4.jpg-300x113.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-4.jpg-150x57.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-4.jpg.jpg 960w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>Open up the <strong>templates\/themeXXXX\/css\/template.css<\/strong> file and scroll down to the very bottom. There you need to paste the code copied from the <strong>fonts.css<\/strong> file.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Now you can apply the new font to any element by specifying the <strong>font-family<\/strong> attribute. You should add the following code to the very bottom of the file <strong>templates\/themeXXXX\/css\/template.css<\/strong><\/p>\r\n<pre class=\"brush:css\">\r\n\t\t\t.icemegamenu > ul > li > a.iceMenuTitle {\r\n\t\t\tfont-family: newfont;\r\n\t\t\t}\r\n\t\t<\/pre>\r\n<p><strong>.icemegamenu > ul > li > a.iceMenuTitle<\/strong> is the element specific selector. Sometimes the <strong>font-family<\/strong> attribute may already be declared in another file, and to overwrite it, you need to either find that place in code and put your font name instead or add the <strong>important<\/strong> specifier:<\/p>\r\n<pre class=\"brush:css\">\r\n\t\t\t.icemegamenu > ul > li > a.iceMenuTitle {\r\n\t\t\tfont-family: newfont !important;\r\n\t\t\t}\r\n\t\t<\/pre>\r\n<p>The resulting code should look like this:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-5.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-5.jpg-300x113.jpg\" alt=\"Joomla_3.x._How_to_add_and_use_a_custom_font-5.jpg\" width=\"300\" height=\"113\" class=\"aligncenter size-medium wp-image-51503\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-5.jpg-300x113.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-5.jpg-150x57.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/Joomla_3.x._How_to_add_and_use_a_custom_font-5.jpg.jpg 960w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>Save the changes in the <strong>templates\/themeXXXX\/css\/template.css<\/strong> file and upload it to the server.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=XDs9mIl4ODU?width=1280&amp;height=720\" rel=\"prettyPhoto\">Joomla 3.x. How to add and use custom fonts<\/a><\/p>\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/cart.php?addOffer=587\">\r\n<img src=\"\/help\/files\/banners\/inline\/Banner-1-(500-x100).jpg\" \/>\r\n<\/a>","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to add any operating system font to your Joomla site and apply it to text.<\/p>\n","protected":false},"author":85,"featured_media":51793,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[724],"tags":[789,688,483],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/51499"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/85"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=51499"}],"version-history":[{"count":1,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/51499\/revisions"}],"predecessor-version":[{"id":82249,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/51499\/revisions\/82249"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/51793"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=51499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=51499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=51499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}