waldyrious / downstyler

A stylesheet and bookmarklet that trims webpage styles down to near-bare HTML.
http://waldyrious.net/downstyler
ISC License
29 stars 5 forks source link

Use Libertinus Serif as default serif font #56

Closed waldyrious closed 4 years ago

waldyrious commented 4 years ago

As mentioned in #15:

Both Linux Libertine and STIX seem to be quite nice as generic serif fonts. It might be worth [...] considering changing the default, since Palatino is quite wide, and therefore a little bit opinionated.

I've been experimenting personally with Libertinus Serif (the successor of the now dormant Linux Libertine project), and I must say it is indeed quite pleasant and less opinionated than Palatino-like fonts.

Instead of attempting to find similarities in the native font stacks of macOS, Windows and Linux, this PR simply imports the webfont stylesheet from the excellent Font Library project. There is a flash of unstyled content as the external stylesheet and fonts download, but since this bookmarklet's very premise relies on such a style swap, I don't consider it a deal-breaker.

There may be a slight issue if the stylesheet is being used as a base style for webpages, rather than merely as part of the bookmarklet, but AFAIK nobody is using this style (and they can always make a copy anyway).

One nice extra thing about this is that headings can now benefit from a less heavy bold style by using the 'Libertinus Serif Display' font. The result is really nice.

I'll let this PR sit for a while, as I test-drive the recent fixing of #47, which might alleviate the issues I've been facing lately.

Fixes #15 (and is related to #25).

waldyrious commented 4 years ago

Comparison:

Palatino Libertinus
Palatino Libertinus
waldyrious commented 4 years ago

I'll go ahead and merge. The Palatino-like font is clearly opinionated, and goes somewhat against the spirit of this project, which aims to approximate the aesthetics of an unstyled web page, with only minimal enhancements for readability.