{"id":8682,"date":"2018-01-09T12:11:58","date_gmt":"2018-01-09T12:11:58","guid":{"rendered":"http:\/\/rifetheme.com\/help\/docs\/customizing-the-theme\/general-settings\/fonts-settings\/"},"modified":"2021-12-06T14:50:04","modified_gmt":"2021-12-06T14:50:04","slug":"fonts-settings","status":"publish","type":"docs","link":"https:\/\/rifetheme.com\/help\/docs\/customizing-the-theme\/general-settings\/fonts-settings\/","title":{"rendered":"Fonts settings"},"content":{"rendered":"<p>Accessed in <strong>Appearance \u2192 Customize \u2192\u00a0General settings \u2192 Fonts settings.<\/strong><\/p>\n<p>Here you can choose fonts for your page. You can set font for 3 main layout elements:<\/p>\n<ol>\n<li><strong>Font for top nav menu, interactive elements, short labels, etc.<\/strong><\/li>\n<li><strong>Font for Titles\/Headings<\/strong><\/li>\n<li><strong>Font for normal(content) text<\/strong> &#8211; text in posts\/pages, and other places with a lot of text.<\/li>\n<li><strong>Font for text logo<\/strong> &#8211; available <strong>since Rife Free\/Pro 1.8.3<\/strong><\/li>\n<\/ol>\n<h3>Using System Fonts<\/h3>\n<p>If you choose the <strong>System font<\/strong> for some group then remember that this setting depends on fonts installed on a client device. However it is fastest loading option.<\/p>\n<p>Font family rule looks like this: <code>-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif<\/code><\/p>\n<p>By selecting this font you will use system font of device that your site is opened in. It is good for &#8220;native&#8221; feeling of your website.<\/p>\n<p><a href=\"https:\/\/www.smashingmagazine.com\/2015\/11\/using-system-ui-fonts-practical-guide\/#details-of-approach-b\">More on which font will be used on which device.<\/a><\/p>\n<h3>Using Google Webfonts<\/h3>\n<p>If you choose <strong>Google Webfont<\/strong> then remember to choose needed variants and subsets. For the preview, google font is loaded with variants regular and 700, and all available subsets.<\/p>\n<p>You have to select what subset of chars do you need for your language, and also what styles you wish to use.<\/p>\n<p>For example, fonts for titles should always be selected with bold style(600 or 700), unless it is set different. In another case, the browser will try to emulate bold face of font, and it might look strange.<\/p>\n<p>Same with the font for content &#8212;\u00a0 you should choose a font that has bold, italic and maybe italic bold style.<\/p>\n<p>On the other hand, if some variant will not be used in your page you shouldn&#8217;t select it, cause it will only make loading of your page slower. Same goes for subsets.<\/p>\n<p>If you will write mainly in English then you should be good with almost any font. If your language has some different chars you should always test your selected font.<\/p>\n<h3>Using Typekit webfonts<\/h3>\n<p>There is no in theme build in support for Typekit, but it is still simple to use Typekit fonts if you are familiar with Typekit.<\/p>\n<p>Just follow below steps:<\/p>\n<ol>\n<li><strong>Install Typekit plugin <\/strong>&#8212;\u00a0 Get it <a href=\"https:\/\/wordpress.org\/plugins\/typekit-fonts-for-wordpress\/\">from here<\/a> or look for &#8220;Typekit Fonts for WordPress&#8221; in plugins installation panel in your WordPress.<\/li>\n<li><strong>Activate the plugin<\/strong> and go to <strong>Settings \u2192 Typekit Fonts<\/strong><\/li>\n<li>in <strong>Typekit Embed Code<\/strong> field add code that you received from Typekit. It will look something like that:\n<pre class=\"line-numbers\"><code class=\"language-markup\">&lt;script src=\"https:\/\/use.typekit.net\/x22owobf.js\"&gt;&lt;\/script&gt;\r\n&lt;script&gt;try{Typekit.load({ async: true });}catch(e){}&lt;\/script&gt;<\/code><\/pre>\n<\/li>\n<li>in <strong>Custom CSS Rules<\/strong> field add CSS for one, or more, below groups.<\/li>\n<\/ol>\n<h4>Example<\/h4>\n<p>Let&#8217;s say you want to use font &#8220;Europa&#8221; that you have added to your kit in Typekit. Then replace &#8220;font-name&#8221; with &#8220;europa&#8221; in below code examples.<\/p>\n<p><strong>Text content font:<\/strong><\/p>\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Text content font *\/\r\n    html,input,select,textarea{\r\n        font-family: \"font-name\", sans-serif;\r\n    }<\/code><\/pre>\n<p><strong>Top menu font content:<\/strong><\/p>\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Top menu font *\/\r\n    ul.top-menu,\r\n    #menu-overlay{\r\n        font-family: \"font-name\", sans-serif;\r\n    }<\/code><\/pre>\n<p><strong>Titles font:<\/strong><\/p>\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Titles and titles alike font *\/\r\n    h1,h2,h3,h4,h5,h6,\r\n    h1 a,h2 a,h3 a,h4 a,h5 a, h6 a,\r\n    .page-title,\r\n    .widget .title{\r\n        font-family: \"font-name\", sans-serif;\r\n    }<\/code><\/pre>\n<p><strong>Text Logo font:<\/strong><\/p>\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Text content font *\/\r\n    a.logo{\r\n        font-family: \"font-name\", sans-serif;\r\n    }<\/code><\/pre>\n<h3>Using Custom Font from font file<\/h3>\n<p>There is no in theme build in support to use custom webfont that is provided from the file, but it is pretty easy to do it.<\/p>\n<p>Every time you add custom webfont to any site, you have to do 3 things:<\/p>\n<ol>\n<li>Add font files somewhere on your server<\/li>\n<li>Link this font in CSS.<\/li>\n<li>Use this font on desired elements of the layout.<\/li>\n<\/ol>\n<p>There are numbers of ways to do it, but I will explain it with use of child theme, as it is the safest way in my opinion, if you want to be safe on theme updates.<\/p>\n<p>&nbsp;<\/p>\n<h4>Process<\/h4>\n<ol>\n<li><a href=\"https:\/\/rifetheme.com\/help\/docs\/installation-updating\/installing-the-rife-child-theme\/\">Install child theme<\/a> &amp; activate it.<\/li>\n<li>Get your webfont. As for this example, I will use the <a href=\"https:\/\/transfonter.org\/examples\">Lobster font from here<\/a>.<\/li>\n<li>In child theme create <strong>font<\/strong> directory.<\/li>\n<li>Upload there font files, in this example <strong>Lobster.eot<\/strong> &amp; <strong>Lobster.ttf<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8913 alignnone\" src=\"https:\/\/rifetheme.com\/wp-content\/uploads\/2018\/01\/custom-web-font-child-theme.png\" alt=\"Custom webfont in child theme\" width=\"229\" height=\"139\" \/><\/li>\n<li>With each webfont, there is usually style sheet file, in this case, <strong>stylesheet.css<\/strong>. We open it and copy its content to child themes <strong>style.css<\/strong>.<\/li>\n<li>We have to provide a valid path to font files, so we add <code>font\/<\/code> before every <code>Lobster.eot<\/code> &amp; <code>Lobster.ttf<\/code>. It should look like this:\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Top menu font *\/\r\n    @font-face {\r\n\tfont-family: 'Lobster';\r\n\tsrc: url('font\/Lobster.eot');\r\n\tsrc: url('font\/Lobster.eot?#iefix') format('embedded-opentype'),\r\n\t\t\t\t url('font\/Lobster.ttf') format('truetype');\r\n\tfont-weight: normal;\r\n\tfont-style: normal;\r\n}<\/code><\/pre>\n<\/li>\n<li>Now we have to tell our theme for which elements we want to use new web font. In our example, we want to use it for the main menu. So in <a href=\"https:\/\/rifetheme.com\/help\/docs\/customizing-the-theme\/custom-css\/\">custom CSS<\/a>, we add following code:\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Top menu font *\/\r\n    ul.top-menu,\r\n    #menu-overlay{\r\n        font-family: Lobster, sans-serif;\r\n    }<\/code><\/pre>\n<\/li>\n<li>Save your changes, and now you should see your font.<\/li>\n<\/ol>\n<h4>Groups of elements<\/h4>\n<p>You can use your web font for any elements, however, if you want to replace font for one of theme defined group of elements, then use one of below codes.<\/p>\n<p>Let&#8217;s say you want to use font &#8220;Lobster&#8221;, then replace &#8220;font-name&#8221; with &#8220;Lobster&#8221; in below code examples.<\/p>\n<p><strong>Text content font:<\/strong><\/p>\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Text content font *\/\r\n    html,input,select,textarea{\r\n        font-family: \"font-name\", sans-serif;\r\n    }<\/code><\/pre>\n<p><strong>Top menu font content:<\/strong><\/p>\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Top menu font *\/\r\n    ul.top-menu,\r\n    #menu-overlay{\r\n        font-family: \"font-name\", sans-serif;\r\n    }<\/code><\/pre>\n<p><strong>Titles font:<\/strong><\/p>\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Titles and titles alike font *\/\r\n    h1,h2,h3,h4,h5,h6,\r\n    h1 a,h2 a,h3 a,h4 a,h5 a, h6 a,\r\n    .page-title,\r\n    .widget .title{\r\n        font-family: \"font-name\", sans-serif;\r\n    }<\/code><\/pre>\n<p><strong>Text Logo font:<\/strong><\/p>\n<pre class=\"line-numbers\"><code class=\"language-css\">\/* Text content font *\/\r\n    a.logo{\r\n        font-family: \"font-name\", sans-serif;\r\n    }<\/code><\/pre>\n<h3>Information<\/h3>\n<p>It is good practice to not use too many different Web fonts as it slows loads time of your site.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":8670,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_tag":[],"class_list":["post-8682","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/docs\/8682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/comments?post=8682"}],"version-history":[{"count":12,"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/docs\/8682\/revisions"}],"predecessor-version":[{"id":9228,"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/docs\/8682\/revisions\/9228"}],"up":[{"embeddable":true,"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/docs\/8670"}],"next":[{"title":"Heading styles","link":"https:\/\/rifetheme.com\/help\/docs\/customizing-the-theme\/general-settings\/heading-styles\/","href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/docs\/8683"}],"prev":[{"title":"Hidden sidebar","link":"https:\/\/rifetheme.com\/help\/docs\/customizing-the-theme\/general-settings\/hidden-sidebar\/","href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/docs\/8681"}],"wp:attachment":[{"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/media?parent=8682"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/rifetheme.com\/help\/wp-json\/wp\/v2\/doc_tag?post=8682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}