BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.07k stars 1.47k forks source link

Export Fonts when exporting HTML #3396

Open shmolf opened 4 years ago

shmolf commented 4 years ago

Current behavior

When exporting a note to HTML, the CSS is exported, but not any font files.

As a result,

Below is an example of Latex, missing the Katex fonts: image

Expected behavior

Below is an example of Latex, with the proper font representation: image

Steps to reproduce

  1. Create a note with the following as part of the content:
    $$[x^n + y^n = z^n]$$
    $$\frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x).$$
  2. Export the note to an HTML file
  3. Load the newly exported HTML file, and view the Latex

Environment

Tangentially Related Issues

arcturus140 commented 4 years ago

3127 is also tangentially related as it is missing a font on export.

shmolf commented 4 years ago

@Flexo013 I'd like to be assigned this. I've started working on it, and I'm checking on a few things.

I'll create a PR after the prior one has been merged.

shmolf commented 4 years ago

@arcturus140 As an update, I have the Font Export working, but only for fonts originating from the Application. System Fonts are not exported for the HTML.

I cannot get images to export yet, but that was only part of one of the tangent issues.

I got the admonitions working, as that was just another font.

Here's a test.pdf for an example.

arcturus140 commented 4 years ago

this looks great. Maybe we don't need system fonts? it is very common to exclude them for websites or PDF documents. The font is then used if available, an alternative otherwise.