Skip to content

Commit

Permalink
Integrate fallback option into the web version
Browse files Browse the repository at this point in the history
  • Loading branch information
neuschaefer committed Mar 14, 2024
1 parent 5a33974 commit ca5cdaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions web/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ <h3>How to use the generated fonts in LVGL?</h3>
</div>
</div>

<div class="form-group row">
<label for="name" class="form-label col-md-2">Fallback</label>
<div class="col-md-5">
<input type="text" name="fallback" id="fallback" class="form-control" placeholder="E.g. lv_font_montserrat_24">
</div>
</div>

<div class="form-group row">
<label for="height" class="col-md-2 col-form-label">Size</label>
<div class="col-md-5">
Expand Down
4 changes: 3 additions & 1 deletion web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ document.querySelector('#converterForm').addEventListener('submit', function han
e.preventDefault();

var _name = document.getElementById('name').value;
var _fallback = document.getElementById('fallback').value;
var _size = document.getElementById('height').value;
var _bpp = document.getElementById('bpp').value;
/* eslint-disable max-depth, radix */
Expand Down Expand Up @@ -110,7 +111,8 @@ document.querySelector('#converterForm').addEventListener('submit', function han
lcd_v: document.getElementById('subpixel3').checked,
use_color_info: document.getElementById('use_color_info').checked,
format: 'lvgl',
output: _name
output: _name,
lv_fallback: _fallback
};

convert(args).then(result => {
Expand Down

0 comments on commit ca5cdaf

Please sign in to comment.