Remove hard-coded fonts from Common.css
The following discussion is closed. Please do not modify it.
Closed by original poster. Font family is not the only factor affecting how the text looks; there is also line height, which is also hard-coded and (at least usually) doesn’t have a dedicated option in the browser settings, unlike fonts. Page and H2 section headers are likewise hard-coded in default MediaWiki settings. Many users who have already commented think that we should maintain consistent fonts across operating systems and browsers. A separate suggestion will be opened for
considering an alternative font setup. ―
BabylonAS 07:27, 13 March 2025 (UTC)
MediaWiki:Common.css has this definition near the top:
body{
font-family:"Liberation Sans",Arial,Helvetica,FreeSans,sans-serif;
}
Do we really need to set a specific set of fonts for the wiki? Each visitor may have their own font preferences; for instance, I like the Noto Sans font more than Liberation Sans. MediaWiki already defaults to a sans-serif font (font-family: sans-serif), which in turn is chosen on the browser’s end (and can be configured by the user). But the way we have it right now, you’d need a personal common.css file (only available for registered users) or maybe a browser extension to set the font you want to use.
Therefore I suggest removing those CSS rules from Common.css. A few language sections (Russian, Chinese, Spanish) that don’t copy the English wiki blindlessly don’t have them at all. — BabylonAS 16:28, 10 March 2025 (UTC)
- Apparently, this was added back in October of 2013 with an Try to keep font style and width consistent across platforms explanation by now-inactive Majr. This is not a valid reason to hard-code fonts because why does this website needs them to be consistent across platforms? It's not like we're using custom icons or obscure Asian characters. I support this proposal. Arina (she/her) 16:40, 10 March 2025 (UTC)
- 👁 Image
Update: the Spanish wiki does have hard-coded fonts, but has “Roboto Flex” added before “Liberation Sans” in their font hierarchy. — BabylonAS 16:52, 10 March 2025 (UTC)
- On the Spanish wiki we added the Roboto Flex font because at least for our users' opinions it looked better than the old font, though I'm not a fan of the way we're using it and changing the font someday to use local-hosted fonts instead of imports is something I wouldn't discard. --Supeika (talk) 18:51, 10 March 2025 (UTC)
- 👁 Image
Note: Please see MediaWiki talk:Common.css#Liberation Sans and User talk:Majr/Archive 12#Two things for relevant context. -- 👁 Image
MarkusRost (talk) 17:04, 10 March 2025 (UTC)
- The most relevant comment:
The default font on Linux was DejaVu Sans which looks twice as wide as Arial, making everything take up way too much space.
-- 👁 Image
MarkusRost (talk) 17:11, 10 March 2025 (UTC)
- It might have been in 2013, but not necessarily right now. It may be different even between Linux distributions and desktop environments. The aforementioned Noto Sans ended up being installed as a hard dependency of a KDE Plasma component on my Arch Linux installation. BabylonAS 17:20, 10 March 2025 (UTC)
- Still, I don't see any valid reason in these discussions for not only why this was added in the first place, but why we need to keep this now. Arina (she/her) 17:20, 10 March 2025 (UTC)
- I'm only pointing on the reason on why it was added originally, which had a valid reason at the time. If this reason is still relevant now I do not now. -- 👁 Image
MarkusRost (talk) 17:30, 10 March 2025 (UTC)
- Well, Wikipedia follows the MediaWiki defaults, and I’m pretty sure font consistency would’ve been even more important for them than for us. If they don’t bother... should we do? BabylonAS 17:34, 10 March 2025 (UTC)
- 👁 Image
Comment: I would say that we should actually repurpose this forum into a larger discussion about changing the font on this wiki, or even most of the language variants of MCW.
- About the removal of the hardcoded fonts itself, while I'm a fan of customization and if anyone sees the Spanish wiki they'll notice how different some of its elements do look compared to the English wiki, I actually like to have consistent fonts across platforms, because it gives a website a part of its identity. For example, minecraft.net does have a font recognizable across devices. Having also a standard font helps accesibility, because choosing an accessible enough font helps people that might have certain vision issues. --Supeika (talk) 18:57, 10 March 2025 (UTC)
- I don’t think we need a font to shape the wiki’s identity, we have a plenty of other suitable things. BabylonAS 19:06, 10 March 2025 (UTC)
- The font is a part of the identity, not all of it. --Supeika (talk) 19:50, 10 March 2025 (UTC)
- I don't think the argument for removing it is very strong. If someone is passionate enough about their fonts to care what font each website is using, then they can put in the effort to override it. The Russian and Chinese wikis, noted for not having this bit of css, are two wikis which aren't using latin based characters so its very reasonable that they aren't running into this issue. If we were to change what we have now I would like it to be more standardized (either a local server or web font), not less. We already have enough issues with ensuring everything looks correct on the various skins/themes/modes across screen sizes, it seems unwise to add an additional variable of font width.
- What data do we have that shows the issue from 2013 would no longer be an issue? Mudscape 👁 Image
talk 19:13, 10 March 2025 (UTC)
- The Cyrillic script, used by Russian, is related to Latin though the common ancestor — Ancient Greek alphabet — and has a bit of shared typographic history (at least since the early 18th century when Peter the Great decided to adopt Western practices for Russian typesetting). Right now, widely used Western fonts usually have both Latin, Cyrillic and Greek in one package; this holds true for the ones currently hard-coded in Common.css; thus, unlike Chinese script, we don’t need dedicated Cyrillic fonts. Note that the Ukrainian wiki does have the font hard-coding — Ukrainian being another language using Cyrillic characters.
- As I’ve already noted in an earlier comment, different Linux setups may have different default fonts, whether that’s DejaVu, Noto, Ubuntu or something else. Windows has Segoe UI while I’m sure Apple OSes have something else. I understand the appeal of offering a consistent experience across any circumstances, but, again, a much larger wiki apparently doesn’t bother with it. BabylonAS 19:36, 10 March 2025 (UTC)
- I 👁 Image
Oppose for this brings consistency across the wiki(s). But I will support if something is done to make it the default font but would change if you have a set font in your browser. - 👁 Image
StizzurpXDD(talk) 04:42, 11 March 2025 (UTC)
- Upon investigating the matter on Wikipedia, I've found that they did try using a specific set of fonts for the body. However, it apparently didn't work well on wikis with non-Latin languages (or even languages with diacritics, such as Polish), so they reverted to a plain
font-family: sans-serif “until a better solution is found”, which apparently wasn’t (see mw:Typography update, wp:Village pump (technical)/Archive 125#Font size and style). There is a specific standard set of fonts for the headers though. All of that is implemented not just on Wikipedia but as MediaWiki defaults (which we still use for the headers).
- One of the opinions given on the Wikipedia’s linked village pump page points to different philosophies between web resources, where the readers have an influence on the layout, and printed media, which always remain the way they were printed in. Minecraft Wiki already provides many features to suit the readers’ various tastes and cirsumstances: light and dark mode, full and fixed width, various skin themes (though only really available for registered users at the moment), and a mobile version. These are however still defined on the wiki’s end. What can be easily chosen on the reader’s end are their browser’s default fonts. BabylonAS 12:13, 11 March 2025 (UTC)
- 👁 Image
Amendment: Not all fonts look good under the same line height, which we have set in CSS directly (see MediaWiki:Vector.css). That is unfortunately something not easily modifiable on the browsers' end.
- Seeing as many would prefer having a consistent font for the wiki, I’m considering retracting my original suggestion and instead discussing a different font stack, ideally as a separate forum post. ― BabylonAS 07:05, 13 March 2025 (UTC)
I propose to add an option, a drop down list, in the user preference's appearance section with many popular and compatible fonts in the list. This way, anybody wishing to change the font can easily do so in their user preferences. Even new or logged out user would be able to change fonts if they wish to. This, is my opinion, is one of the only way to deal with this periodic discussion on fonts.
👁 Image
Support as the proposer. - 👁 Image
StizzurpXDD(talk) 09:15, 11 March 2025 (UTC)