This did not work for me... I downloaded the shoelace theme and tried to implement your fontface method. I get a 404 for the font...
Here is the lib code in it's entirety:
<?php
defined('MOODLE_INTERNAL') || die();
function amda_user_settings($css, $theme) {
global $CFG;
if (!empty($theme->settings->customcss)) {
$customcss = $theme->settings->customcss;
} else {
$customcss = null;
}
$tag = 'setting:customcss';
$css = str_replace($tag, $customcss, $css);
if ($theme->settings->enableglyphicons == 1) {
$amdaicons = '
[class ^="icon-"],[class *=" icon-"] { background-image: url("'.$CFG->wwwroot.'/theme/image.php?theme=amda&component=theme&image=glyphicons-halflings"); }';
$css .= $amdaicons;
}
$navlogowidth = 40;
$navlogoheight = 40;
if (!empty($theme->settings->navlogo_height)) {
$navlogoheight = $theme->settings->navlogo_height;
}
if (!empty($theme->settings->navlogo_width)) {
$navlogowidth = $theme->settings->navlogo_width;
}
$extrapadding = 40 + $navlogowidth;
if (!empty($theme->settings->navlogo_url)) {
$css .= '
@media ( min-width : 980px) {
.navbar .brand {
padding-left: 40px;
}
.navbar-static-top .container .nav-collapse, .navbar-fixed-top .container .nav-collapse, .navbar-fixed-bottom .container .nav-collapse {
padding-left: '.$extrapadding.'px;
}
}';
}
return $css;
}
/**
* Implements font-face functionality in theme
* Only disabled as we may opt to use webfonts at a later time
*
*/
function amda_process_css($css, $theme) {
$css = amda_set_fontwww($css);
// Set custom CSS.
if (!empty($theme->settings->customcss)) {
$customcss = $theme->settings->customcss;
} else {
$customcss = null;
}
$css = amda_set_customcss($css, $customcss);
return $css;
}
function amda_set_fontwww($css) {
global $CFG;
$tag = 'setting:fontwww';
$css = str_replace($tag, $CFG->wwwroot . '/theme/amda/fonts/', $css);
return $css;
}
function amda_set_customcss($css, $customcss) {
$tag = 'setting:customcss';
$replacement = $customcss;
if (is_null($replacement)) {
$replacement = '';
}
$css = str_replace($tag, $replacement, $css);
return $css;
}
And here is my CSS for the fonts:
@font-face {
font-family: 'FuturaStd-Book';
font-weight: normal;
font-style: normal;
src: url('setting:fontwwwFuturaStd-Book.otf');
}
@font-face {
font-family: 'FuturaStd-Medium';
font-weight: normal;
font-style: normal;
src: url('setting:fontwwwFuturaStd-Medium.otf');
}
@font-face {
font-family: 'Formata-Medium';
font-weight: normal;
font-style: normal;
src: url('setting:fontwwwFormata-Medium.otf');
}
A screen capture of my console: