On Wednesday, 16 December 2015 at 21:05:27 UTC, Andrei Alexandrescu wrote:
I was looking at https://github.com/D-Programming-Language/dlang.org/pull/1169 and that bold sans serif proportional text for the code is just... well let's say it's time to replace it.

What would be a good code font to use for those?


Thanks,

Andrei

Let's stay away from web fonts.

Rationale:

Different text rendering algorithms will render the same text and font file in different ways. A font may look nice on one platform, but pretty bad on another.

The default fonts (i.e. monospace) are generally set to something that will look fine on that system. Other fonts bundled with the OS are also likely to look good. Using a custom font may thus make the text less readable on some platforms (plus the downsides already mentioned in this thread).

I am not completely opposed to the idea of using a web font, on the condition that it is tested and does not lead to a downgrade of usability on any of the major platforms, but I don't think the downsides are worth it.

Looking at what other people are doing (and have much more resources to think about such things):

Microsoft (MSDN): Consolas,Courier,monospace
Apple: Menlo,monospace
Android: Consolas,"Liberation Mono",Menlo,Courier,monospace
Go: Menlo,monospace
Java: monospace
Python: Consolas,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif

It seems that all of the above are fonts that are likely to be already installed on users' systems.

Reply via email to