Eelis / cxxdraft-htmlgen

Generates https://eel.is/c++draft
Other
168 stars 13 forks source link

Switch global font to Computer Modern #110

Open jengelh opened 7 months ago

jengelh commented 7 months ago

A sample PR for employing the same font in the HTML as is used in the PDF. There is a bit of concern though: Serif fonts and low-resolution (96dpi) displays don't historically mix well, which is why you don't see them all that often on webpages (e.g. newspaper sites). It's ok when you look at it with a mobile phone (just tested at 400dpi) or set browser page magnification to 150% on a low-dpi screen, so :shrug: goodenoughforme.

Fixes https://github.com/Eelis/cxxdraft-htmlgen/issues/98 .

Fixes https://github.com/Eelis/cxxdraft-htmlgen/issues/103 (no longer using font fragments with unicode-range).

Incidentally, this also fixes contacting Google services (GDPR and all that).

Haven't looked at the MathJAX parts at all(!), I just made sure the new CSS renders ok with https://eel.is/c++draft/format.string.escaped#example-1 .

Eelis commented 7 months ago

This reduces the load time of /full on my machine from almost 3 minutes, to about 10 seconds, which is awesome!

But it doesn't solve the wideness and header overflow issue mentioned in #98, because it changes from the status quo: image to: image (In the PDF it looks like:) image

jengelh commented 7 months ago

overflow behavior is a separate topic to look at