{"id":82,"date":"2021-06-03T21:36:58","date_gmt":"2021-06-03T20:36:58","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/?page_id=82"},"modified":"2021-06-09T21:13:40","modified_gmt":"2021-06-09T20:13:40","slug":"text-font","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/css\/css-properties\/text-font\/","title":{"rendered":"font-family"},"content":{"rendered":"<h1><a href=\"https:\/\/www.w3schools.com\/css\/css_font.asp\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"image-59 alignright\" src=\"https:\/\/glow-prod-sh.s3.eu-west-1.amazonaws.com\/sh\/public\/ahscomputinghtml\/uploads\/sites\/3275\/2021\/06\/03210120\/w3schools-150x150.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&#038;X-Amz-Security-Token=IQoJb3JpZ2luX2VjEFAaCWV1LXdlc3QtMSJHMEUCIQD9mkKTAq9G0HkMbEOcLVXtV%2F9NHjK1jCJq0ToMYHfG1wIgaGSwTU1y0RNpd7ENE1Y69sVXCar0B7FOUkT%2B8VhEzSAquAUIGRAFGgwyNzM1NzAxOTU0MzMiDAIbsemGmjHyg8a8oSqVBX7hVwiPqlWo0F%2B%2F9dVhHwpg0BVgO8nXGei%2FQ%2BZMGgT3Q4wyRGXspNOoZbwRZPQon%2FYvo7LTnN45lNqq%2BKmDHdyrn4BIWCBcMH5Aa5rjblCAAwDCFDOWKBuyOaUAW%2BdES5FKzJsvd%2BIohlLHjwbm%2BbDi1davXtBsNLWSX6rIpT32PwVv79vHZxciAO1JRPvIQFZ2emZibN8n3wvvM1%2FPUU8QJU3QJ%2FzCn3VjjRJd5KlRYXDrAt2rGJ1EQL%2BGulJ4poIPUZtj9Zd6Sugx7i%2BMBC1kZ1sofkLPp1F44jndGibY8baMZJEruFvoHtxqOzRY1oqDJQecpPBQjTmirlOjeceZ7pR8JkEZbSnxjhLrbB%2BFT7hd%2FR0TEOYNqfHld%2F4%2BvywDNuEyf67Jr0sEwzV%2B0QNoRBfmJCxvIKERdayJ6wsMPuKStckrc0frEURjTQXXRGJ%2B3rj8LTDbJrETSHULoxILF6N1ExjIqslTQOCjSQawV92%2BS0coPXG7YmzrpGiFoiA4x7D94P4xwGWO2K5SnO7VMniG4jCkGFFH6o5UIbTZ4ZKCHy9VMUKic1clMWOtYmQI%2BtVN2cSOfUaOV%2FkeSv2W19E4lvWvni2oTvkwASgVzceIbw5P%2FFHPaue%2B4z1N3E1%2BSvE2447sKYhiOKjMm7vd75UT3UIrp1zI%2Bu8Ylv4rWqsr3ljuscYUamBLr5Idg0ZrX8OhRAP1m%2FyEKaMVwGEJWJFzE5Pv91sK%2FG3qrNokayB3OIJtB02meERa%2B4qTOumzlsK4xKTwxSv09wF1z0uFtFWvK8KJYDXVY4SJDWGVeT%2FFdgrVeTqzqu8OoJ%2Fvp4F9VXJ8SSxsfcb9ZGkucYjfbqHg5ySLaSMKCfwWamUcZhQzjmwwibKXzwY6sQE0i%2BJIDyd4RUmBModkgX%2FiGpSPvb1738lIoUZtn4f0HXrrgPSKJC7OPvlGw9PA%2B30zMNvKI1someMpCXCdwI2dtLlCU2qJz6N2TtVT4KDW9Li7VeikxD9Xa588owS9QNvU8DAtbiOCc75nU2A7mgZwvnXbJI2%2Flt031qdt2hUrfXd%2FKkw2kBDQih4VABa0B57nEbI41cEcilDTAiczU0e6gcgh8y6Ds286%2FoVknA208fA%3D&#038;X-Amz-Algorithm=AWS4-HMAC-SHA256&#038;X-Amz-Credential=ASIAT7MQN47USOH7Y4UO%2F20260420%2Feu-west-1%2Fs3%2Faws4_request&#038;X-Amz-Date=20260420T081633Z&#038;X-Amz-SignedHeaders=host&#038;X-Amz-Expires=900&#038;X-Amz-Signature=269c6c5a63ce2bbeacab98b9c702f424221a54c920f8aa418f15dd32cf7f497e\" alt=\"\" width=\"50\" height=\"47\" \/><\/a><\/h1>\n<p>Font rules can be given to text objects or their containers.<\/p>\n<p>Fonts are often given a list, so that if a font is not available then another can be used.<\/p>\n<p>If a font name has a space, then it must be enclosed in either quotation marks or apostrophes.<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\np {\r\n\u00a0\u00a0font-family: &quot;Times New Roman&quot;, Times, serif;\r\n}\r\n<\/pre>\n<h1>Google Fonts<\/h1>\n<p>There are 10 <a href=\"https:\/\/www.w3schools.com\/cssref\/css_websafe_fonts.asp\">web safe fonts<\/a>.<\/p>\n<p><a href=\"https:\/\/fonts.google.com\/\">Google Fonts<\/a> has over 1000 fonts that are free to use. However, before you can use a Google font it has to be loaded in either an external or internal style sheet.<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">@import url('https:\/\/fonts.googleapis.com\/css2?family=Roboto&amp;display=swap');\r\n\r\np {\r\n    font-family: 'Roboto', sans-serif;\r\n}\r\n<\/pre>\n<p>Spaces inside a font name needs to be replaced with a &#8216;+&#8217; sign when it is loaded, but surrounded by quotation marks or apostrophes when it is used:<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">@import url('https:\/\/fonts.googleapis.com\/css2?family=Sigmar+One&amp;display=swap');\r\n\r\nh1 {\r\n    font-family: 'Sigmar One', cursive;\r\n}\r\n<\/pre>\n<p>The Google Fonts page will give you necessary code to copy and paste &#8211; click on the <strong>@import<\/strong> option<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Font rules can be given to text objects or their containers. Fonts are often given a list, so that if a font is not available then another can be used. If a font name has a space, then it must be enclosed in either quotation marks or apostrophes. p { \u00a0\u00a0font-family: &quot;Times New Roman&quot;, Times, serif; } Google Fonts There are 10 web safe fonts. Google Fonts has over 1000<\/p>\n<p><a class=\"more-link\" href=\"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/css\/css-properties\/text-font\/\">Read More<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"parent":366,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-82","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/wp-json\/wp\/v2\/pages\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":8,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/wp-json\/wp\/v2\/pages\/82\/revisions"}],"predecessor-version":[{"id":234,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/wp-json\/wp\/v2\/pages\/82\/revisions\/234"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/wp-json\/wp\/v2\/pages\/366"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/sh\/ahscomputinghtml\/wp-json\/wp\/v2\/media?parent=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}