{"id":580,"date":"2016-02-11T15:39:14","date_gmt":"2016-02-11T15:39:14","guid":{"rendered":"http:\/\/popupdomination.com\/docs\/?p=580"},"modified":"2016-02-11T15:39:14","modified_gmt":"2016-02-11T15:39:14","slug":"change-fonts","status":"publish","type":"post","link":"https:\/\/popupdomination.com\/docs\/change-fonts\/","title":{"rendered":"Change Fonts"},"content":{"rendered":"<h1>How to change fonts in my PopUp<\/h1>\n<h2>1. Let&#8217;s start with finding more appropriate font &#8211; go to <a href=\"https:\/\/www.google.com\/fonts\" target=\"_blank\">Google Fonts<\/a> page. If you use English in your popup, you have nothing to worry about. For most of other languages with Latin alphabet you&#8217;ll have to use Latin Extended, I also want Sans Serif font, let&#8217;s use the filtering. I like Lato, let&#8217;s use this font &#8211; click Add to Collection:<\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-585\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/fonts4-1.png\" alt=\"fonts4\" width=\"1190\" height=\"788\" \/><\/p>\n<h2>2. Let&#8217;s use this Font (you can choose more then one at a time):<\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-586\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/fonts5-1.png\" alt=\"fonts5\" width=\"1209\" height=\"665\" \/><\/p>\n<h2>3. We have to choose what font styles we&#8217;ll need. It will be Normal 400, Bold 700 and Ultra-Bold 900 for me and I&#8217;ll need both Latin and Latin Extended fonts. When everything&#8217;s selected click @import tab and copy code:<\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-587\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/fonts6-1.png\" alt=\"fonts6\" width=\"1190\" height=\"816\" \/><\/p>\n<h2>4. On PopUp Wizard Step 2 click on <em>I know what I am doing, let me add some css <\/em>notification and open Advanced CSS input field:<\/h2>\n<h2><img loading=\"lazy\" class=\"alignnone size-full wp-image-583\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/fonts2-1.png\" alt=\"fonts2\" width=\"1193\" height=\"791\" \/><br \/>\n4. Paste code from Google Fonts:<\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-588\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/Capture11-1.png\" alt=\"Capture11\" width=\"1193\" height=\"815\" \/><\/p>\n<h2>5. Now we have to find the Text blocks selector name. Right click on text you want to change, Inspect Element (Inspect on Chrome):<\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-581\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/fonts-1.png\" alt=\"fonts\" width=\"1097\" height=\"943\" \/><\/p>\n<h2>6. We see that Class name in our case is <em>.p3 h1<\/em>:<\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-582\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/fonts1-1.png\" alt=\"fonts1\" width=\"1206\" height=\"787\" \/><\/p>\n<h2>7. We already know our Class name, so we are ready start to write the code:<em> .p3 h1 {\u00a0\u00a0 }<\/em><\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-590\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/fonts7-1-1.png\" alt=\"fonts7\" width=\"1194\" height=\"817\" \/><\/p>\n<h2>8. Now let&#8217;s return back to Google Fonts page and copy fonts CSS code:<\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-593\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/fonts8-1-1.png\" alt=\"fonts8\" width=\"1192\" height=\"820\" \/><\/p>\n<h2>9. Now paste it into our code and add another line, I want my font weight 700, so I type <em>font-weight: 700; <\/em>and that&#8217;s it, we changed the Font of Heading. We can save our PopUp now or make some more changes to CSS.<\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-594\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/fonts9-1.png\" alt=\"fonts9\" width=\"1193\" height=\"822\" \/><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h1>What else text properties can we change using CSS?<\/h1>\n<div class=\"st-accordion-wrap\"><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#font-size-specifies-the-font-size-of-text\">font-size - specifies the font size of text<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>Normally we would define our <em>font-size<\/em> in <em>px<\/em> (pixels) of <em>%<\/em> (percent or parent element&#8217;s font size), however there are much more options:<\/h2>\n<ul>\n<li>\n<h2><em>medium<\/em> &#8211; (default) sets the font-size to a medium size;<\/h2>\n<\/li>\n<li>\n<h2><em>xx-small<\/em> &#8211; sets the font-size to an xx-small size;<\/h2>\n<\/li>\n<li>\n<h2><em>x-small<\/em> &#8211; sets the font-size to an extra small size;<\/h2>\n<\/li>\n<li>\n<h2><em>small<\/em> &#8211; sets the font-size to a small size;<\/h2>\n<\/li>\n<li>\n<h2><em>large<\/em> &#8211; sets the font-size to a large size;<\/h2>\n<\/li>\n<li>\n<h2><em>x-large<\/em> &#8211; sets the font-size to an extra large size;<\/h2>\n<\/li>\n<li>\n<h2><em>xx-large<\/em> &#8211; sets the font-size to an xx-large size;<\/h2>\n<\/li>\n<li>\n<h2><em>smaller<\/em> &#8211; sets the font-size to a smaller size than the parent element;<\/h2>\n<\/li>\n<li>\n<h2><em>larger<\/em> &#8211; sets the font-size to a larger size than the parent element.<\/h2>\n<\/li>\n<\/ul>\n<h2>In our example we will make text large: <em>.p3 h {font-size: large;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#font-style-specifies-the-font-style-for-text\">font-style - specifies the font style for text<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>There are three possible values of <em>font-style<\/em>:<\/h2>\n<ul>\n<li>\n<h2><em>normal<\/em> (default);<\/h2>\n<\/li>\n<li>\n<h2><em>italic<\/em>;<\/h2>\n<\/li>\n<li>\n<h2><em>oblique<\/em>.<\/h2>\n<\/li>\n<\/ul>\n<h2>We&#8217;ll make our heading <em>oblique<\/em>:<em> .p3 h {font-style: oblique;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#font-variant-specifies-whether-or-not-a-text-should-be-displayed-in-a-small-caps-font\">font-variant - specifies whether or not a text should be displayed in a small-caps font<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2><em>font-variant <\/em>has only two values &#8211; default <em>normal <\/em>and <em>small-caps<\/em>. Let&#8217;s try this:<em> .p3 h {font-variant: small-caps;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#font-weight-specifies-the-weight-of-a-font\">font-weight - specifies the weight of a font<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>We already used this property, but there are more values here:<\/h2>\n<ul>\n<li>\n<h2><em>normal<\/em> (default);<\/h2>\n<\/li>\n<li>\n<h2><em>bold<\/em>;<\/h2>\n<\/li>\n<li>\n<h2><em>bolder<\/em>;<\/h2>\n<\/li>\n<li>\n<h2><em>lighter<\/em>;<\/h2>\n<\/li>\n<li>\n<h2>number values from 100 &#8211; 900, where 400 is the same as normal and 700 is the same as bold, we used 700 already.<\/h2>\n<\/li>\n<\/ul>\n<h2>We had<em> .p3 h {font-weight: 700;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#color-sets-the-color-of-text\">color - sets the color of text<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>Ok, you can change font color in app, but sometimes you might want to do it with CSS.<\/h2>\n<h2>There are three ways, how you can tell the <em>color<\/em>:<\/h2>\n<ul>\n<li>\n<h2>color: red; <em>(using color name)<\/em>;<\/h2>\n<\/li>\n<li>\n<h2>color: #ff0000 <em>or<\/em> color: f00; <em>(using hex color code)<\/em>;<\/h2>\n<\/li>\n<li>\n<h2><span class=\"highATT\">color:<\/span><span class=\"highVAL\"> rgb(255,0,0); <em>(using RGB color code).<\/em><\/span><\/h2>\n<\/li>\n<\/ul>\n<h2>In our example if we want to get red heading it would look like <em>.p3 h {color: #f00;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#direction-if-you-want-to-change-to-rtl\">direction - if you want to change to RTL<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>You can change text direction using property direction: <em>.p3 h {direction: rtl;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#letter-spacing-increases-or-decreases-the-space-between-characters\">letter-spacing - increases or decreases the space between characters<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>Letter spacing can be defined by adding pixels between letter for bigger spaces and subtracting to get letters tighter together:<em> .p3 h {letter-spacing: -1px;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#line-height-sets-the-line-height\">line-height - sets the line height<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>In our example it&#8217;s not necessary, but if you have two or more lines, you would probably like to make space between lines bigger or smaller.<\/h2>\n<h2><em>line-height<\/em> can be defined in three ways:<\/h2>\n<ul>\n<li>\n<h2>line-height: 110%; <em>(line height in percent of the current font size)<\/em>;<\/h2>\n<\/li>\n<li>\n<h2>line-height: 1.5; <em>(a number that will be multiplied with the current font size to set the line height)<\/em>;<\/h2>\n<\/li>\n<li>\n<h2>line-height: 15px; <em>(a fixed line height in px)<\/em>.<\/h2>\n<\/li>\n<\/ul>\n<h2>Here&#8217;s how it looks like in our example: <em>.p3 h {line-height: 120%;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#text-align-specifies-the-horizontal-alignment-of-text\">text-align - specifies the horizontal alignment of text<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>There are four values for <em>text-align<\/em> &#8211; <em>left, right, center, justify. <\/em>In our case let it be <em>.p3 h {text-align: justify;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#text-decoration-specifies-the-decoration-added-to-text\">text-decoration - specifies the decoration added to text<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>We can set <em>underline, overline <\/em>or<em> line-trough <\/em>to our text: <em>.p3 h {text-decoration: overline;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#text-indent-specifies-the-indentation-of-the-first-line-in-a-text-block\">text-indent - specifies the indentation of the first line in a text-block<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>You can set <em>text-indent<\/em> in <em>px<\/em> (fixed indentation in pixels) or <em>%<\/em> (indentation in % of the width of the parent element). We don&#8217;t need indentation since it&#8217;s heading we are making changes to, but let&#8217;s make it small <em>.p3 h {text-indent:<\/em> 10px;}<\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#text-shadow-specifies-the-shadow-effect-added-to-text\">text-shadow - specifies the shadow effect added to text<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>To set shadow we have to define 1) horizontal shadow <em>(necessary)<\/em>, 2) vertical shadow <em>(necessary)<\/em>, 3) blur-radius <em>(optional, 0 by default) <\/em>and 4) color <em>(optional, color options are the same as for color property we discussed before)<\/em>. Complete look will be little more complicated &#8211; <em>.p3 h {<span class=\"highATT\">text-shadow:<\/span><span class=\"highVAL\"> 3px 2px 10px #FF0000;<\/span>}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#text-transform-controls-the-capitalization-of-text\">text-transform - controls the capitalization of text<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>There are three values for <em>text-transform<\/em>:<\/h2>\n<ul>\n<li>\n<h2><em>capitalize<\/em> &#8211; transforms the first character of each word to uppercase;<\/h2>\n<\/li>\n<li>\n<h2><em>uppercase<\/em> &#8211; transforms all characters to uppercase;<\/h2>\n<\/li>\n<li>\n<h2><em>lowercase<\/em> &#8211; transforms all characters to lowercase;<\/h2>\n<\/li>\n<\/ul>\n<h2>Let&#8217;s make our heading <em>uppercase<\/em>: <em>.p3 h {text-transform: uppercase;}<\/em><\/h2>\n<p><\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#word-spacing-increases-or-decreases-the-space-between-words-in-a-text\">word-spacing - increases or decreases the space between words in a text<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h2>You can specify <em>word-spacing<\/em> in <em>px<\/em> (pixels). Let&#8217;s say: .p3 h {<span class=\"highATT\">word-spacing:<\/span><span class=\"highVAL\"> 30px;<\/span>}<\/h2>\n<p><\/div><br \/>\n<\/div>\n<h2>Now, let&#8217;s try to put this all together in one code and see what will we get:<br \/>\n.p3 h {<br \/>\nfont-family: &#8216;Lato&#8217;, sans-serif;<br \/>\nfont-size: large;<br \/>\nfont-style: oblique;<br \/>\nfont-variant: small-caps;<br \/>\nfont-weight: 700;<br \/>\ncolor: #f00;<br \/>\ndirection: rtl;<br \/>\nletter-spacing: -1px;<br \/>\nline-height: 120%;<br \/>\ntext-align: justify;<br \/>\ntext-decoration: overline;<br \/>\ntext-indent: 10px;<br \/>\ntext-shadow: 3px 2px 10px #FF0000;<br \/>\ntext-transform: uppercase;<br \/>\nword-spacing: 30px;<br \/>\n}<br \/>\nCrazy:<br \/>\n<img loading=\"lazy\" class=\"alignnone size-full wp-image-597\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/popupcss-1.png\" alt=\"popupcss\" width=\"675\" height=\"203\" \/><\/h2>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to change fonts in my PopUp 1. Let&#8217;s start with finding more appropriate font &#8211; go to Google Fonts page. If you use English in your popup, you have nothing to worry about. For most of other languages with Latin alphabet you&#8217;ll have to use Latin Extended, I also want Sans Serif font, let&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[14,62,78],"_links":{"self":[{"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/posts\/580"}],"collection":[{"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":0,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"wp:attachment":[{"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}