Вы можете сделать это с помощью javascript / jquery, шаги решения:
- проверить, является ли сайт https или нет.
if (location.protocol != 'https:')
{
//http font
} else {
//https font
}
загрузить правильный шрифт.
$("head").prepend("<style type=\"text/css\">" +
"@font-face {\n" +
"\tfont-family: \"myFont\";\n" +
"\tsrc: local('☺'), url('myFont.otf') format('opentype');\n" +
"}\n" +
"\tp.myClass {\n" +
"\tfont-family: myFont !important;\n" +
"}\n" +
"</style>");