Reorder comic fonts used in error pages for httpd(8) and relayd(8)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Reorder comic fonts used in error pages for httpd(8) and relayd(8)

Nathan Galt
I happened upon <https://www.openrsync.org/goals.html>, currently a 404 Not Found page, and noticed that its font ordering was odd. While I appreciate the httpd author's attempt to inject a bit of fun into error pages, the ordering of the fonts in the font-family property could be improved. Currently, all devices that have Chalkboard SE installed (iOS, macOS) also have Comic Sans MS installed. This means that Apple-device users aren't getting the best comic font available on their system. Windows users are in a similar situation; even if some of them install Comic Neue, Comic Sans MS will be chosen first as Comic Sans MS comes with Windows, too.

Since the font stack appears to be crafted to pick the best-available comic font, I'm submitting this patch so viewers of httpd and relayd error pages get the best-available preinstalled comic font.

Apologies if I've submitted the patch incorrectly; this is my first time posting in tech@.

diff --git usr.sbin/httpd/server_http.c usr.sbin/httpd/server_http.c
index 817588e2278..bc11700a92a 100644
--- usr.sbin/httpd/server_http.c
+++ usr.sbin/httpd/server_http.c
@@ -923,7 +923,7 @@ server_abort_http(struct client *clt, unsigned int code, const char *msg)
 
  /* A CSS stylesheet allows minimal customization by the user */
  style = "body { background-color: white; color: black; font-family: "
-    "'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif; }\n"
+    "'Chalkboard SE', 'Comic Neue', 'Comic Sans MS', sans-serif; }\n"
     "hr { border: 0; border-bottom: 1px dashed; }\n";
 
  /* Generate simple HTML error document */
diff --git usr.sbin/relayd/relay_http.c usr.sbin/relayd/relay_http.c
index f31c7e6e183..4153f53cca8 100644
--- usr.sbin/relayd/relay_http.c
+++ usr.sbin/relayd/relay_http.c
@@ -1052,7 +1052,7 @@ relay_abort_http(struct rsession *con, u_int code, const char *msg,
  /* A CSS stylesheet allows minimal customization by the user */
  style = (rlay->rl_proto->style != NULL) ? rlay->rl_proto->style :
     "body { background-color: #a00000; color: white; font-family: "
-    "'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif; }\n"
+    "'Chalkboard SE', 'Comic Neue', 'Comic Sans MS', sans-serif; }\n"
     "hr { border: 0; border-bottom: 1px dashed; }\n";
 
  /* Generate simple HTTP+HTML error document */

Reply | Threaded
Open this post in threaded view
|

Re: Reorder comic fonts used in error pages for httpd(8) and relayd(8)

Reyk Floeter-2
Thanks for your patch!

So we have to figure out if people prefer the new fonts or the classic Comic Sans MS font.

It is style vs. authenticity.

But I think your suggestion is OK.

Reyk

> Am 09.05.2019 um 15:34 schrieb Nathan Galt <[hidden email]>:
>
> I happened upon <https://www.openrsync.org/goals.html>, currently a 404 Not Found page, and noticed that its font ordering was odd. While I appreciate the httpd author's attempt to inject a bit of fun into error pages, the ordering of the fonts in the font-family property could be improved. Currently, all devices that have Chalkboard SE installed (iOS, macOS) also have Comic Sans MS installed. This means that Apple-device users aren't getting the best comic font available on their system. Windows users are in a similar situation; even if some of them install Comic Neue, Comic Sans MS will be chosen first as Comic Sans MS comes with Windows, too.
>
> Since the font stack appears to be crafted to pick the best-available comic font, I'm submitting this patch so viewers of httpd and relayd error pages get the best-available preinstalled comic font.
>
> Apologies if I've submitted the patch incorrectly; this is my first time posting in tech@.
>
> diff --git usr.sbin/httpd/server_http.c usr.sbin/httpd/server_http.c
> index 817588e2278..bc11700a92a 100644
> --- usr.sbin/httpd/server_http.c
> +++ usr.sbin/httpd/server_http.c
> @@ -923,7 +923,7 @@ server_abort_http(struct client *clt, unsigned int code, const char *msg)
>
>    /* A CSS stylesheet allows minimal customization by the user */
>    style = "body { background-color: white; color: black; font-family: "
> -        "'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif; }\n"
> +        "'Chalkboard SE', 'Comic Neue', 'Comic Sans MS', sans-serif; }\n"
>        "hr { border: 0; border-bottom: 1px dashed; }\n";
>
>    /* Generate simple HTML error document */
> diff --git usr.sbin/relayd/relay_http.c usr.sbin/relayd/relay_http.c
> index f31c7e6e183..4153f53cca8 100644
> --- usr.sbin/relayd/relay_http.c
> +++ usr.sbin/relayd/relay_http.c
> @@ -1052,7 +1052,7 @@ relay_abort_http(struct rsession *con, u_int code, const char *msg,
>    /* A CSS stylesheet allows minimal customization by the user */
>    style = (rlay->rl_proto->style != NULL) ? rlay->rl_proto->style :
>        "body { background-color: #a00000; color: white; font-family: "
> -        "'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif; }\n"
> +        "'Chalkboard SE', 'Comic Neue', 'Comic Sans MS', sans-serif; }\n"
>        "hr { border: 0; border-bottom: 1px dashed; }\n";
>
>    /* Generate simple HTTP+HTML error document */
>