I want to change moodle's default font. I used this link but it didn't work. I changed theme css and added fonts to a new folder but nothing changes in moodle. There is no good tutorial on the net. Any help would be appreciated.
I use a theme named "more". I went to this directory: moodleServer/theme/more/style
There is one css file named custom.css. I added another css file (myStyle.css) and put these codes inside it:
@font-face {
font-family: "Greta";
src: url("fonts/Greta-Regular.otf");
}
p, div {
font-family: "Greta";
}
I also added a folder named "fonts" and copied my otf files inside it. Then in this folder: moodleServer/theme/more I edited file config.php and changed this line:
$THEME->sheets = array('custom');
to
$THEME->sheets = array('custom', 'myStyle.css');
There is also a line in this file that specifies parent style files:
$THEME->parents = array('clean', 'bootstrapbase');
In the bootstrapbase folder there is a style folder and it contains 2 css files: editor.css and moodle.css
I changed moodle.css and replaced all fonts with my font. I also added a fonts folder and copied my font inside it. I added the following lines to this file:
@font-face {
font-family: "Greta";
src: url("fonts/Greta-Regular.otf");
font-weight: normal;
font-style: normal;
}
and changed all fonts to Greta:
body {
margin: 0;
font-family: Greta;
font-size: 14px;
line-height: 20px;
color: #333;
background-color: #fff;
}
When I use "inspect element" to view my page source I still see previous fonts and css files.