diff --git a/material/base.html b/material/base.html
index ea5a1fb96..fc7a74d47 100644
--- a/material/base.html
+++ b/material/base.html
@@ -50,13 +50,14 @@
{% block libs %}{% endblock %}
{% block fonts %}
{% if config.theme.font != false %}
- {% set font = config.theme.font %}
+ {% set text = config.theme.font.text | d("Roboto", true) %}
+ {% set code = config.theme.font.code | d("Roboto Mono", true) %}
-
+
{% endif %}
{% endblock %}
{% for path in config["extra_css"] %}
diff --git a/src/base.html b/src/base.html
index fc7adb415..b98d8fa06 100644
--- a/src/base.html
+++ b/src/base.html
@@ -102,19 +102,20 @@
{% if config.theme.font != false %}
- {% set font = config.theme.font %}
+ {% set text = config.theme.font.text | d("Roboto", true) %}
+ {% set code = config.theme.font.code | d("Roboto Mono", true) %}
{% endif %}