So, I have the following structure
root@courseware:/var/www/html/theme/boost# ls fonts/
eot ttf woff woff2
root@courseware:/var/www/html/theme/boost# ls fonts/eot/
MYNEWFONT_Black.eot MYNEWFONT.eot
root@courseware:/var/www/html/theme/boost# find . -name *.css
./style/moodle.css
Then I commented the font-face in the ./style/moodle.css and replaced that with
@font-face {
font-family: MYNEWFONT;
font-style: normal;
font-weight: normal;
src: url('../fonts/eot/MYNEWFONT.eot');
src: url('../fonts/eot/MYNEWFONT.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('../fonts/woff2/MYNEWFONT.woff2') format('woff2'), /* FF39+,Chrome36+, Opera24+*/
url('../fonts/woff/MYNEWFONT.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('../fonts/ttf/MYNEWFONT.ttf') format('truetype');
}
After saving and restarting apache2, I don't see any change. The font is still the default one.
I have to say that I am using a non-English font.
eot/ ttf/ woff/ woff2/
font-family: IRANSans;
font-style: normal;
font-weight: normal;
src: url('/theme/boost/fonts/eot/IRANSansWeb.eot');
src: url('/theme/boost/fonts/eot/IRANSansWeb.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('/theme/boost/fonts/woff2/IRANSansWeb.woff2') format('woff2'), /* FF39+,Chrome36+, Opera24+*/
url('/theme/boost/fonts/woff/IRANSansWeb.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('/theme/boost/fonts/ttf/IRANSansWeb.ttf') format('truetype');
}
body{ font-family:IRANSans !important;}
Do use the 'url([[font:theme|fontname.eot]]);' syntax, even though it is not standard CSS, it 'will' work if used in a theme CSS / SCSS file such as moodle.scss.