Change Font in Code listings?

This a general question: is there a way to change to font that is used in code listings in Sonarqube Cloud?

Frankly, I find the currently used font quite annoying to read, plus it messes up all my ASCII art… is it even fixed-width?

In case it matters, my codebase is C/C++. I’m using Firefox on macos.

Hey @Sidelobe

It’s not customizable, although I guess you could roll your own stylesheet if it really bothers you!

The font is Ubuntu Mono, which is fixed-width.

Could you share a screenshot? Not just because I want to see your ASCII art :wink:

Thanks for confirming it’s fixed-width, @Colin :+1:

I’m guessing that applies the source code, but not to the comments?
The ASCII art is obviously in the comments – I guess I could put this particular example in @code / @endcode, but I also use ASCII headers with the project logo in every file.

Example:

Ideally, there would be a config option like Render comments/docu in fixed-width font, which is set to false by default to keep the current behaviour.

I got talking to our UX team today about this and they were super interested in having some feedback on this! Apparently choosing a font was a tough decision. They’ll be around soon.

1 Like

In case you need more examples, here’s an example from one of my open-source projects:

https://sonarcloud.io/code?id=Sidelobe_HyperBuffer&selected=Sidelobe_HyperBuffer%3Asource%2FHyperBuffer.hpp

1 Like