When papers are written in the academic world, URLs are often set in monospace. The reason for this seems to be historic and is described in this Q&A at TexSE. It may be summarized as a leftover from when URLs were uncommon. They were perceived as some form of computer code, which used to be printed in monospace.
Using a monospace font is not pleasing to the eye, particularly when used in combination with a proportional font. This is the case even when proportional and unproportional fonts of the same typeface are combined (here: Linux Libertine and Linux Libertine Mono).
So the question is: should monospacing URLs still be the de facto standard, or should another method be favoured, or should highlighting URLs be disadvised in general?
Answer
Using a monospace font is not pleasing to the eye, […]
Yes, but then reading URLs isn’t very pleasing anyway. So, think about for a second why you typeset a URL in the first place. Nowadays, you often do not need to do this at all, because in almost any digital medium you can equip some human-readable text with a hyperlink, which is more comfortable for everybody involved. If you actually need to typeset an URL, it is usually for a printed medium and then it’s not for being read like regular text, but for being translated to digital information, usually by a reading and typing human, sometimes by an OCR software.
With this in mind, the criteria for typesetting URLs are a bit different than for normal text. Regular text contains a lot of redundancy that enables us to quickly read it – even if we get some detail wrong, our brain can easily auto-correct it¹. This doesn’t apply for URLs: The reader has to get every character right. As always with readability, the concern is not that the reader makes unfixable mistakes, but rather that they do not waste a few seconds re-reading to locate their mistake and that they are not annoyed.
Another relevant consideration when typesetting URLs is that some characters are used differently than in normal text and thus fonts designed for normal texts are usually suboptimal when applied as they are. For example, the baseline dot (.) is usually used to mark an important separation in both, normal texts and URLs. However, when used as a full stop in normal texts, it is followed by a space, which optically supports this function. This does not apply to URLs and in particular kerning may lead to the dot being much less prominent than it deserves to be. In another example, uppercase characters are much less common in URLs.
¹ To strt wth, u cn stl dcphr ths sntnc. Tihs sencetne is eevn eisear to raed. Almost all punctuation marks, capitalisation, and articles can be guessed from context.
If you look at the top example, the first thing that will probably catch your eye is the all-caps 47ATX, which is bad as it is not particularly important and if you want to type that URL, you usually want to start at the beginning. This problem is at least alleviated on the bottom due to capital letters being relatively smaller in height as well as in width.
The main structure of the URL is much easier to parse in the bottom example as the dots, hyphen, and slashes are given more space, in terms of glyph width and kerning.
The m is not particular beautiful in the bottom example: It looks rather squeezed and the shortened middle stem is out of place. However, it is clearly an m and cannot be mistaken for rn. While this is a problem for every kind of text, misreading such aspects is considerably more annoying with URLs as you won’t notice it instantly but have to go back and spot your mistake after you got a 404 error or landed on a pom site (credit ChrisH for the pun).
While none of the above criteria is strictly tied to a font being proportional or monospace, your average monospace typeface scores much better than your average proportional typeface. However, if you are aware of the disadvantages of regular proportional fonts, you can also address most of them without changing the font, in particular by adapting the spacing.
So, at the end of the day, you have to find a compromise considering the following factors:
How well does your monospace font match the regular font?
How many URLs do you have to typeset?
How long and complicated are your URLs? For example, www.example.com is more benign in terms of readability with a regular font than the above example.
How much time and effort do you want to invest?
No comments:
Post a Comment