Open alexmyczko opened 3 years ago
Thanks for the feedback! This is definitely something I've been thinking about how to add best.
It would be easy to add all the fonts you've installed on your system to the dropdown and use those in the preview. But what happens if you export the document as HTML and somebody opens it that doesn't have that font installed? Should we include a webfont for that case? Google fonts?
It should be included as woff2, see woff2_compress
, if license permits (it does for all fonts available by fnt
). Definitely do not link to the internet for privacy reasons, see the links at fnt
README.md.
I can test on Linux and macOS (having all system/user fonts in the list would already be a great improvement)
I would love to be able to add a new font as well. Adding the ability to insert the font as a <link>
or @import
would mean it is the responsibility of the user to ensure the font they add to the editor is also available in any generated document.
You should be able to add custom CSS for the preview with @import
or directly with @font-face
commands (see the README.md), though I haven't tried it recently...
I am specifically looking to have the editor and the preview (and the export) all default to using Atkinson Hyperlegible and IBM Plex Mono for variable and fixed width fonts. Using the @import will do the trick for the preview and export but won't change the editor. I'd like to see the editor support any font installed locally and have the user responsible for adding the font to the preview or export.
edit: remove reply via email weirdness
Okay yes, let's keep this issue about the preview (and export), I've created https://github.com/mb21/panwriter/issues/93 for the use-case with loading custom css into the editor.
Thanks for PanWriter, but the font dialog is very limited, maybe add support for this?
https://github.com/alexmyczko/fnt