haddock icon indicating copy to clipboard operation
haddock copied to clipboard

Add haddock option to override googleapis font URL

Open jwaldmann opened this issue 5 years ago • 3 comments

originally brought up here: https://gitlab.haskell.org/ghc/ghc/-/issues/18392 (not by me but I support the proposal. I would have deleted "in Debian" from the second sentence.)

Haddock produces documents using fonts from the hard-coded URL https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700. Having a package downloading something from an external resource every time a user opens the documentation is considered bad practice in Debian. Lintian (an error reporting tool for Debian packages) produces the following warning:

W: privacy-breach-generic [<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=pt+sans:400,400i,700" />] (https://fonts.googleapis.com/css?family=pt+sans:400,400i,700)

It would be great to add an option to haddock (just like --mathjax=URL) to allow users to override the hard coded fontUrl to something available locally. Debian already packages this font family (fonts-paratype package) so we could use that flag to point to them instead of Google.

jwaldmann avatar Jul 02 '20 20:07 jwaldmann

Are these fonts needed at all? I have googleapis.com blocked by umatrix (naturally) and can still read and navigate haddock output. What features am I missing?

jwaldmann avatar Jul 02 '20 20:07 jwaldmann

We should ship the used fonts ourselves, if they are used at all.
Thank you for raising this.

Kleidukos avatar Jan 04 '21 20:01 Kleidukos

Any update on this issue? (since it's been a few years)

DCsunset avatar Mar 07 '24 22:03 DCsunset

This ticket lives at https://gitlab.haskell.org/ghc/ghc/-/issues/18392

Kleidukos avatar May 22 '24 12:05 Kleidukos