Pick better monospace font? (Drop Consolas)

Consolas is currently the preferred fixed-width font on Ask Fedora, which is unfortunate as I’ve noticed it has some… deficiencies.

Specifically: is the last character in this: aplay -l a letter or a numeral?

Three of the next four fonts on the list (I don’t have Lucida Console available locally) do a much better job of formatting that text clearly.

With some assistance from the GIMP…
So, maybe we can just drop Consolas from the list? Or move it to the end, instead of the beginning.


(Personally I’m not wild about Monaco either. Take your pick):

  • the lowercase L is still a bit too right-angled and 1-ish
  • the weird shape of the lowercase A and lowercase P (and others)

and though they’re not visible here:

  • The uppercase Q has an overpowering, too-long descender
  • It’s one of those fonts where the asterisk is too small and too high, almost like it’s superscripted.

It does have lovely @ and & characters, though, I’ll give it that.

There are no font related settings in the admin panel, so we can’t change these on our current Discourse plan. Discourse hosts the instance for us and this is what they’re using on their platform.

You should be able to change the font used for Monospace in your browser maybe?

Oh, wow… you mean you don’t even get a site CSS file? Man, that is some weak sauce. Oh, well.

That wouldn’t work (because it’s not using the default monospace font to begin with), but I could certainly override the choice with a UserStyle. That hardly helps all the other users who can’t tell -l from -1 , though.

I guess the best option, and probably the one I’ll take, is to create a public userstyle and share it at userstyles.org. That way, anyone else who wants can install the same correction (provided they use the Stylish or Stylus addons.)

I’ll share a link when I’ve got it posted. Thanks.

…And maybe I’ll try to file a bug with Discourse, too. Because I used to shout into Facebook’s or Google’s support void pretty regularly, but haven’t done that for months and months now. I guess I’m nostalgic for that feeling of utter insignificance. Hopefully Discourse support is just as unresponsive.


There’s some CSS that we can edit, but not much. I see nothing that lets us change fonts. If you can ask Discourse at meta.discourse.org, they may be able to give us steps if it can be done.

Hm. I mean, the CSS I’m installing locally is literally just

code, pre {
    font-family: "Lucida Console", "Liberation Mono",
        "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Menlo,
        Consolas, Monaco, "Courier New", monospace;

Which updates the original styling applied from https://sea1.discourse-cdn.com/business4/stylesheets/app/assets/stylesheets/desktop/discourse.scss:

code, pre {
  font-family: Consolas, Menlo, Monaco, "Lucida Console",
     "Liberation Mono", "DejaVu Sans Mono",
     "Bitstream Vera Sans Mono", "Courier New", monospace;

(I ended up changing my mind about the font-size adjustment, for the final userstyle. Which, since I forgot to mention it in this thread, is now available here: https://userstyles.org/styles/174558/ask-fedora-cleaner-fixed-width-fonts )

Afaik you can just override the font-family on monospace tags (probably just the code tag and also whatever potentially magic tags used for highlighted blocks), I’ve done this on a personal Discourse and babyDora did it on his as well.

1 Like

Yes, but we don’t have access to the server to modify any files. We do not host this instance. We only pay for it and all of that is done by Discourse for us (that was the point—not having to spend the manpower to maintain it).

All we can do is edit things from the admin interface. So if this can be done from there, I’m happy to do it. I just haven’t found it there.

1 Like

as @FranciscoD we don’t hosted the site so we can’t do it much more here, the only solution available is:

Too much work for only this…

NOTE : writing all this STUFF only for information…



Well, just for the sake of completeness, there’s another option: Get them to tweak their own default theme. (Which this is, no? From reading the CSS, it appears to be just called “desktop”.)

I doubt they’ll actually go for it, but maybe if I point out Consolas’ deficiencies… ¯\_(ツ)_/¯

1 Like

Sure, would you please start a thread on meta.discourse.org (or see if someone has suggested something on these lines)?

It is in the admin interface… IIRC the UI is awkward, but you can basically create a new “theme” with same name as the old one that extends the old one and adds custom styles. I can try logging in to my instance later to see what exactly I did.

@refi64 's recollection does jibe with the official meta.discourse FAQ on this issue, which indicates that themes are modular, and a new Component can be added to apply custom CSS:

  1. Go to Admin panel -> Customize -> Themes -> Install -> Create New , choose a name and select “Component”.

  2. Click on the Edit CSS/HTML button

  3. (Other stuff…)

  4. Add the new component to all the main themes that can be selected by users:

1 Like

There’s also an installable third-party theme component which makes the code font configurable via a form, instead of using CSS. (Discourse themes/components can be sourced from GitHub repos, and are checked daily for updates)

Admin panel screenshot provided by author:

discourse-custom-code repo: GitHub - discourse/discourse-custom-code

I added the OpenSans component. Does it work?


Well… yes and no?

It was effective in changing the default body text poportional font to OpenSans, yes. That affects everything except fixed-width text. That’s still in Consolas.

So, did it fix the issue I originally brought up? Not so much. Exactly the opposite, in fact. :laughing:

Also, I’m seeing two errors per page load on the console, now, that the HTTPS page is trying to request an insecure stylesheet, http://fonts.googleapis.com/css?family=Open+Sans.

Yeah, the top of the component CSS (loaded via https://sea1.discourse-cdn.com/business4/stylesheets/desktop_theme_7_33e31bdc159dc922ae2a06f7f8cd42fe407efa3a.css?__ws=discussion.fedoraproject.org) is trying to do an:

@import url(http://fonts.googleapis.com/css?family=Open+Sans);

I’ve added the custom source code component thing, and changed the font to “Source Code Pro”.

I hope that fixes it. I’m afraid, and I hope you will understand this, that this is extremely low priority on the task list, so I shan’t be able to look into it again any time soon.

Please tweak things in your browser. Changing global settings like this is not something we’re too fond of. We’d like to use discourse’s default as much as possible. That was kind of the point of paying them to host—so that we didn’t have to do this sort of thing. :slightly_frowning_face: