1. 27 Oct, 2021 2 commits
    • Lyza Danger Gardner's avatar
      578a1cd8
    • Robert Knight's avatar
      Fix KaTeX font loading · e3384922
      Robert Knight authored
      When rendering math, the custom KaTex fonts failed to load due to the
      relative URL references in `build/styles/katex.min.css` not matching the
      actual location of the fonts in `build/fonts`. The KaTeX CSS assumes a
      URL structure like:
      
      ```
      katex.min.css
      fonts/
        KaTeX_AMS-Regular.woff2
      ```
      
      Previously font URLs in katex.min.css were rewritten from
      `url('fonts/foo.woff2')` to `url('../fonts/foo.woff2')` by a PostCSS
      plugin when building the CSS bundles. However this got lost when
      replacing the client's local style-bundling script with the one from the
      @hypothesis/frontend-shared package.
      
      By relocating the fonts to a subdirectory of `build/styles` we can make
      the asset references work without needing to do any rewriting of URLs in
      the KaTeX CSS bundle.
      
      In the process, the list of fonts included in the bundle was simplified
      to include just WOFF2 fonts, since all modern browsers support that
      format. Additionally an obsolete reference to fonts in src/styles/vendor
      was removed.
      e3384922
  2. 26 Oct, 2021 3 commits
  3. 25 Oct, 2021 10 commits
  4. 22 Oct, 2021 2 commits
  5. 20 Oct, 2021 1 commit
  6. 19 Oct, 2021 22 commits