Changing main content font to Valkyrie?

post by habryka (habryka4) · 2018-08-24T23:05:42.367Z · score: 25 (4 votes) · LW · GW · 7 comments

(Probably not interesting to 90% of people, but would love to get input from our local typography nerds)

We've been using Warnock Pro as our default font for body-text and content-related elements for a while, and I've been quite happy with it on my Mac, but on Linux on Windows machines the font renders as a bit spindly and thin, and can be hard to read at some smaller font-sizes.

Given that we've been refactoring a bunch of our Typography anyways, it seems like the best time to maybe switch to a new font. In most typography-matters I tend to defer to Butterick's Practical Typography who has a good set of recommendations for fonts similar to Warnock, and my favorite one I've found so far is Butterick's one creation Valkyrie. So changing to that seems like a thing we might do in the next few weeks.

Stylistically, my favorite font continues to be ETBook, but that one sadly has a variety of rendering issues that make it impossible to use on Lesswrong. Valkyrie is about as good as Warnock in that respect, but renders much better on Windows and Linux machines in that respect, but I would love to hear recommendations for other fonts if people have any good ones (commercial fonts are fine, as long as they don't come with weird "amount of user" limits).


Comments sorted by top scores.

comment by Said Achmiz (SaidAchmiz) · 2018-08-25T05:22:58.866Z · score: 23 (6 votes) · LW · GW

I’m a big fan of Butterick’s fonts, and Valkyrie (which I guess is new? I hadn’t seen it before) is no exception. I can find no fault with this font. (Note, though, that Valkyrie seems to default to old-style figures; I would suggest setting the requisite OpenType CSS attributes to switch to lining figures, as these are more generally appropriate.)

(That having been said, there are a number of tricks one can use to solve the “font renders as spindly and thin on Windows/Linux machines”; if you’re interested in expending a relatively minor amount of effort to be able to stick with Warnock, let me know, and I’ll describe several approaches to solving the problem without switching fonts.)

As far as other fonts go, here are some fonts you might consider on the basis of their similarity to ET Book (links go to a page where you’ll see each font side-by-side with ET Book):

(Adobe Jenson Pro should be available via Typekit; I’m not sure about the other two, but they should be available elsewhere.)

comment by habryka (habryka4) · 2018-08-25T06:09:24.828Z · score: 7 (4 votes) · LW · GW

I am definitely willing to invest time into fixing this, so I would be quite glad about help. My first guess was to serve a heavier font-weight to Windows machines, but Warnock Pro sadly doesn't have a 500 font-weight available, and instead goes directly from 400 to semibold (600), which is quite a bit too bold, even for Windows machines.

I've also experimented with all of the font-rendering and font-smoothing options, but none of them seemed to help.

comment by Said Achmiz (SaidAchmiz) · 2018-08-25T06:58:07.973Z · score: 23 (6 votes) · LW · GW

So, here’s the easiest and most flexible way to do this. This will depend on you being able to serve slightly different CSS to different clients (there are, of course, any number of ways to do this—server-side according to user agent, via JS, etc. etc., so I’ll leave that part up to you).

What you’re going to want to do, to “bulk up” the rendering of the text on the offending clients, is to add this to the post body:

text-shadow: 0 0 0 rgba(0,0,0,0.87);

That’s right: a zero-offset, zero-blur text shadow. The alpha value should be at most equal to the alpha of the text color itself, though you’ll want to adjust it for different combinations of browser/OS. (For example, Chrome on Linux seems to render thicker/darker than Chrome on Windows, so you may want to set the alpha for the text shadow to be much lower for Chrome-on-Linux clients; and Firefox is different, etc.)

This lets you correct for rendering differences across browsers/platforms in a very fine-grained way.

comment by Raemon · 2018-08-25T07:11:53.941Z · score: 7 (4 votes) · LW · GW
Warnock Pro sadly doesn't have a 500 font-weight available, and instead goes directly from 400 to semibold (600), which is quite a bit too bold, even for Windows machines.

Oh, I hadn't realized it literally didn't exist (as opposed to we didn't happen to load the 500 weight version). It's actually been grating on me a bit that the bold is a bit too bold, and this moves me towards interest in a different font rather than fixing Warnock.

(On my shortform feed awhile ago Said had some additional thoughts [LW · GW] on using bold for skimmability that might be worth revisiting if we're thinking about fonts more seriously)

comment by Said Achmiz (SaidAchmiz) · 2018-09-03T17:19:30.781Z · score: 19 (4 votes) · LW · GW

Belated comment on this particular aspect of the problem:

It is an unfortunate fact of digital type design that the mapping between “which of the weights that this font comes with are called ‘Regular’ or ‘Medium’ or ‘Semibold’ or ‘Heavy’ etc.”, and “how thick the letterforms actually are / how heavy does the text look when rendered in that weight” is… horrifically inconsistent from font to font (even among fonts from the same designer or publisher!). In other words, you can easily find two fonts such that one or both of the following hold:

  1. The first font’s “Regular” and its “Bold” differ only mildly, whereas the second font’s “Bold” is massively heavier than its “Regular”
  2. The first font’s “Regular” is about as heavy as the second font’s “Light”, and its “Bold” is comparable in weight to the second font’s “Regular”

(And don’t even get me started about inconsistent weight naming! “Regular” vs. “Book”; what the heck is “Medium”; “Semibold” vs. “DemiBold”; is “Heavy” heavier than “Black” or vice-versa? etc., etc.)

The consequence of this is that if you use the publisher-provided CSS files for fonts (which map designer-provided weights to CSS font-weight values according to the established convention of “Regular” = 400, “Medium” = 500, etc.), then setting the CSS font-weight property of your text to, say, 500 offers you no guarantee of how heavy the text will actually look! (This is compounded, of course, by the fact that not all fonts—much less all digital releases of fonts—come with all nine of the “standard” weight grades.)

And this is why I write my own @font-face rules for every one of the fonts I use. I never use the publisher-provided ones; I look at each font I use, and I determine a custom mapping from provided weights to CSS font-weight values, and write the CSS to define that mapping. This lets me guarantee a much greater degree of consistency when switching fonts, or using alternate fonts for different client platforms, etc. (Of course, this does require hosting the font files myself, rather than relying on a service like Google Fonts or TypeKit; but that is easy.)

(If you’re interested in trying this, I’d be glad to make my custom-written CSS files for many of the popular fonts—such as many of Adobe’s offerings, among others—available to you guys.)

Edit: There are other benefits to rolling your own @font-face rules: you can take advantage of CSS features like unicode-range (as explained, e.g., here) to, e.g., specify the use of one font for most of your text but another font for certain mathematical symbols (note that this is different from using font stacks to define a fallback font, as the latter only comes into play if the primary font doesn’t have glyphs for the given characters, whereas unicode-range also works in the case where the primary font does have those glyphs, but you don’t like the way they look, or they render poorly on certain systems, etc.). This, too, affords you greater flexibility in choosing which fonts to use.

comment by habryka (habryka4) · 2018-08-25T06:02:14.345Z · score: 5 (3 votes) · LW · GW

Yep, Valkyrie is new, which is one of the reasons why I got excited about moving to that. And agree on lining figures.

I've experimented with Bembo Book before, but also found it to be a bit too spindly on Windows machines, and it sadly doesn't have a Medium (500) weight that we could set for Windows machines as an alternative (I think). I will experiment with the two other ones, and maybe also try out Bembo again.

comment by lifelonglearner · 2018-08-25T02:02:20.917Z · score: 3 (2 votes) · LW · GW

Note: I am on Windows and find the font fine. I am wondering how many people on Windows find it hard to read?