reflect font-selection from config in web gui

Cherry-picked 3bae6e5 from https://github.com/ChristopherHackett/brother_ql_web

fixes #11
This commit is contained in:
Christopher Hackett 2019-08-26 10:29:48 +01:00 committed by Philipp Klaus
parent 6da0745a41
commit 9e20b6dc3f

View File

@ -51,7 +51,7 @@
<select class="form-control" id="fontFamily" onChange="preview()"> <select class="form-control" id="fontFamily" onChange="preview()">
{% for font_family_name in font_family_names %} {% for font_family_name in font_family_names %}
{% for font_style in fonts[font_family_name].keys() %} {% for font_style in fonts[font_family_name].keys() %}
<option>{{font_family_name}} ({{ font_style }})</option> <option {% if label['DEFAULT_FONTS']['style'] == font_style and label['DEFAULT_FONTS']['family'] == font_family_name %}selected{% endif %}>{{font_family_name}} ({{ font_style }})</option>
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
</select> </select>