{"id":752,"date":"2023-07-01T09:42:10","date_gmt":"2023-07-01T09:42:10","guid":{"rendered":"https:\/\/ictbank.ir\/blog\/?p=752"},"modified":"2023-08-05T06:03:16","modified_gmt":"2023-08-05T06:03:16","slug":"change-font-in-moodle","status":"publish","type":"post","link":"https:\/\/ictbank.ir\/blog\/change-font-in-moodle\/","title":{"rendered":"Change font in Moodle"},"content":{"rendered":"\n<p>If you have an academy and using <a href=\"https:\/\/moodle.org\/\" data-type=\"URL\" data-id=\"https:\/\/moodle.org\/\" target=\"_blank\" rel=\"noopener\">moodle<\/a> as an LMS is your choice, you may want to change default font of pages to a new one. In this article I am going to talk about a method to do so.<\/p>\n\n\n\n<p>First of all you have to choose which theme you wanna use (through <strong>Administration &gt; Appearance &gt; Themes &gt; Theme selector<\/strong>). For example I am gonna use <strong>boost<\/strong> theme.<\/p>\n\n\n\n<p>Then, you have to copy your font&#8217;s files into theme&#8217;s directory.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncp FONT_PATH\/&#x5B;font_file].* MOODLE_PATH\/theme\/&#x5B;theme_name]\n<\/pre><\/div>\n\n\n<p>Then you have to open theme&#8217;s config.php file:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nvi MOODLE_PATH\/theme\/&#x5B;theme_name]\/config.php\n<\/pre><\/div>\n\n\n<p>and change the value of <strong>$THEME-&gt;sheets <\/strong>parameter:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$THEME-&gt;sheets = &#x5B;&#039;FontName&#039;];\n<\/pre><\/div>\n\n\n<p>After that you have to create a <strong>FontName.css<\/strong> file in <strong>MOODLE_PATH\/theme\/[theme_name]\/style<\/strong> directory like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n@font-face {\n        font-family: &#039;IranSans&#039;;\n        font-style: normal;\n        font-weight: normal;\n        font-display: auto;\n\n        src: url(&#x5B;&#x5B;font:theme|font_file.eot]]);\n        src: url(&#x5B;&#x5B;font:theme|font_file.eot]]) format(&#039;embedded-opentype&#039;),\n          url(&#x5B;&#x5B;font:theme|font_file.woff]]) format(&#039;woff&#039;),\n          url(&#x5B;&#x5B;font:theme|font_file.woff2]]) format(&#039;woff2&#039;),\n          url(&#x5B;&#x5B;font:theme|font_file.ttf]]) format(&#039;truetype&#039;),\n          url(&#x5B;&#x5B;font:theme|font_file.svg]]) format(&#039;svg&#039;);\n}\n<\/pre><\/div>\n\n\n<p>and finally, purge your cache through<strong> Site Administration &gt; Development &gt; Purge all caches<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have an academy and using moodle as an LMS is your choice, you may want to change default font of pages to a new one. In this article I am going to talk about a method to do so. First of all you have to choose which theme you wanna use (through Administration [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":756,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[155],"tags":[],"class_list":["post-752","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-other"],"_links":{"self":[{"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/posts\/752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/comments?post=752"}],"version-history":[{"count":4,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/posts\/752\/revisions"}],"predecessor-version":[{"id":758,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/posts\/752\/revisions\/758"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/media\/756"}],"wp:attachment":[{"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/media?parent=752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/categories?post=752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/tags?post=752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}