On Mon, 27 Nov 2017 12:48:08 +0100 Johannes Schauer <[email protected]> wrote: > The simple theme contains references to the ionicons font in searx.min*.css. > Since the font was removed from the source package, using the simple theme > leads to 404 errors and to some buttons not being displayed properly. The > ionicons font was removed because Debian currently doesn't include a compiler > (like grunt-webfont) from svg to the font files. > > There are multiple ways to solve this problem: > > - replace the ionicons font with a similar font that already exists in > Debian. This seems unlikely to work because searx compiles a custom > set of svg files from ionicons plus magnet.svg into a new font. > > - remove the simple theme > > - hack the css to use the svg graphics directly instead of using the > font > > For me, the missing fonts are still shown with some symbol, so I don't > think the theme is yet unusable. Thus, I'm hesitant to remove the theme. > > I'll investigate the other two options.
There is another option: Use fontforge (which is in Debian main) to convert from svg to ttf or woff. This is also what the grunt-webfont module does. We could just call fontforge in debian/rules and then not need grunt-webfont be packaged. Packaging it would be tricky because it depends on another eight nodejs packages which are also not in Debian. To do this use the generate.py script from: https://github.com/sapegin/grunt-webfont/blob/master/tasks/engines/fontforge/generate.py And, assuming you placed navicon-round.svg and search.svg in /tmp/ionicons/svg run the following: cat << END | fontforge -script generate.py { "types": ["woff", "ttf"], "fontFamilyName": "ion", "fontFilename": "ion", "dest": "/tmp/ionicons", "round": 10e12, "codepoints": {"navicon-round": 61697, "search": 61698}, "addLigatures": false, "normalize": false, "version": false, "descent": 64, "fontHeight": 512, "inputDir": "/tmp/ionicons/svg" } END The result will /tmp/ionicons/ion.woff and /tmp/ionicons/ion.ttf which will make the frontpage of the simple theme work. The other icons can be added in the same manner. Care just has to be taken to assign codepoints in the same order as in: https://github.com/asciimoo/searx/blob/master/searx/static/themes/simple/gruntfile.js Thanks! cheers, josch
signature.asc
Description: signature

