oupala / apaxy

a simple, customisable theme for your apache directory listing
https://oupala.github.io/apaxy/
GNU General Public License v3.0
1.86k stars 256 forks source link

Use local copy of the Open Sans font #59

Closed nodiscc closed 5 years ago

nodiscc commented 8 years ago

Hi, I've noticed Apaxy requests the Open Sans font from fonts.googleapis.com + fonts.gstatic.com (https://github.com/AdamWhitcroft/Apaxy/blob/master/apaxy/theme/style.css#L8). Would you be OK to include this font in the release archive, and use that copy by default instead?

Some advantages: No cross-site requests, no leaking of HTTP Referers to font provider, works on LAN-only setups, no dependency on an external service, only 1 connection initiated.

The Google Fonts @include can be left commented out for users that want to re-enable it.

The current TTF fonts used by fonts.googleapis.com can be found at https://github.com/google/fonts/tree/master/apache/opensans. I can start working on a patch, including a Makefile to fetch the latest version from there.

AdamWhitcroft commented 7 years ago

@nodiscc sounds good to me. Did you get round to making that Makefile?

nodiscc commented 7 years ago

Not yet. I will look into that soon.

ghost commented 6 years ago

The changes in #109 also use the external fonts, so if we wish to fix this, the error pages will have to be updated as well.

oupala commented 6 years ago

I agree with @nodiscc, we have to fix this issue. The advantages he lists are important:

Some advantages: No cross-site requests, no leaking of HTTP Referers to font provider, works on LAN-only setups, no dependency on an external service, only 1 connection initiated.

Should we add a script (but it should be platform independent, make might not be available everywhere, see #107), or should we include the font statically?

nodiscc commented 6 years ago

I will look into that soon. Oct 5, 2016

Famous last words. Sorry I actually forgot about this, and I don't think I will have time to work on it. What I would do, in order of preference:

oupala commented 6 years ago

I agree with your proposal.

Depending on the install automation script (see #107), we'll see what solution we will choose.

oupala commented 5 years ago

While testing apaxy, even if the OpenSans font is still imported:

https://github.com/oupala/apaxy/blob/10de49ea5128b6b6d31929f7a40245c765486a5b/apaxy/theme/style.css#L12

I can't find any request to Google to import the font, in the network tab of Firefox developer tools.

Does anyone know why?

ghost commented 5 years ago

Maybe the user can just configure this on their own, as this might be a little hard to do automatically, but nevertheless, I can take a look.

oupala commented 5 years ago

I will remove the Open Sans font from apaxy.