5 ms·
> As an alternative solution, you can ask if the user would like to setup their font on start of emacs and invoke `menu-set-font`. But i think this won't work
by daptaq 4y ago
> As an alternative solution, you can ask if the user would like to setup their font on start of emacs and invoke `menu-set-font`. But i think this won't work for people who want to run their emacs in console, another problem i see with this solution is, it would prompt every time emacs starts, which would lead to more confusion.
Interesting idea. It might be possible to generate a snippet that will remove itself after the first initialization, but if that doesn't work at least a comment could be inserted.
> if i read it correctly `document.fonts` reads like "get all the fonts used on this web page" rather than "get me all the fonts installed on this computer".
Ok, I see. Another possibility would be to use https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet to check for the avaliablility fixed set of popular fonts.