Giter Site home page Giter Site logo

Preview/export: support more fonts? about panwriter HOT 6 OPEN

mb21 avatar mb21 commented on July 20, 2024
Preview/export: support more fonts?

from panwriter.

Comments (6)

mb21 avatar mb21 commented on July 20, 2024 1

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?

from panwriter.

shaneknysh avatar shaneknysh commented on July 20, 2024 1

from panwriter.

alexmyczko avatar alexmyczko commented on July 20, 2024

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)

from panwriter.

shaneknysh avatar shaneknysh commented on July 20, 2024

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.

from panwriter.

mb21 avatar mb21 commented on July 20, 2024

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...

from panwriter.

mb21 avatar mb21 commented on July 20, 2024

Okay yes, let's keep this issue about the preview (and export), I've created #93 for the use-case with loading custom css into the editor.

from panwriter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.