Computer Modern on the Web 67 points by phaer on Dec 23, 2013 | hide | past | web | favorite | 46 comments

 From the transcript on this video http://www.webofstories.com/play/donald.knuth/55;jsessionid=...Well, I came up with 25 of the 26 letters in the middle of June and they weren't beautiful but they were pretty close to being okay to my eyes at the time, but then there was the letter S. And I couldn't figure out how to draw a blasted S. And it has a very peculiar shape where it changes over from curves left, then right a little bit, and then back and forth, and what's going on in this shape. None of my mathematical formulas would handle it. And I spent several days without sleep up at the lab, trying different things and every time it would just look very ugly. And finally, I had to come home and go to bed and I showed my results to Jill and she said to me, ‘Well Don, why don't you make it s-shaped?’
 I swear that a good amount of the TeX love is cargo culting, including any appreciation of Computer Modern, which is a seriously ugly typeface. It's almost as if adopting it for the web is simply a grasp for mathematical credibility more than any real aesthetic consideration.Note: I'm not criticising TeX, but changing fonts away from CM is about the first thing anyone concerned with quality output should be doing.
 > I swear that a good amount of the TeX love is cargo culting, including any appreciation of Computer Modern, which is a seriously ugly typeface.Aesthetics can't be "cargo culting" -- to assert that it is requires misunderstanding aesthetics, cargo culting, or both.> It's almost as if adopting it for the web is simply a grasp for mathematical credibility more than any real aesthetic consideration.Familiarity in context is a real aesthetic consideration.
 Nonsense. As someone else posted here: "Something about the cm fonts gives them an air of respectability."This means that almost every maths paper they read before was typeset in it, thus to be taken seriously they think they need to be as well. This is cargo culting because it is adopting the trappings of insightful study in the field of mathematics without necessarily doing anything of the sort.
 Well, two things. One, CMR shares some traits with other 'old' fonts (sometimes actually old, other times aiming for a dusty or scholarly air): lots of variation in stroke width, relatively prominent serifs, a 'true italic' where some italic letterforms look much different from their roman counterparts. (Knuth was making these for a textbook, so maybe he went for a look similar to textbooks of the time, at some intuitive level at least.)If you look on Google Fonts, Playfair Display and Old Standard TT do some of those same things in (I think) also aiming for an old-timey air.So, I think some of the "air of respectability" comes in part from traits shared with some other fonts, not just from appearing on math papers.Two, the "feel" and aesthetic aspects of a font mostly do come from memory and associations. nytimes.com doesn't use a serif because it's more readable on the Web or something; they do it because serifs and newspapers go together in most folks' minds. Even the most thought-out arguments about fonts have associations as their bedrock: when Robert Bringhurst laments that a font shows no real axis with its variations in stroke width and therefore fails to evoke calligraphy, the axis he's missing is still important "merely" because of its association with calligraphy. Other than purely technical arguments about readability (which you could dispose of with an A/B test), most opinions about fonts are, one way or another, rooted in associations.So if folks do appreciate CM partly because of their experience with it I don't see anything illegitimate about that (unless maybe it were utterly unreadable, rather than just quirky). You don't have to use or like the CM fonts, but I don't see how anyone's clearly indisputably wrong for liking them either, any more than with any other font.
 Well, ok, the people reading the text that respect it more are doing cargo cult... But that's a huge piece of non-news. We already know that people don't act rationally, and that if we try to sell something, it must fit our irrationality.Using the font because it looks respectable isn't cargo cult at all. That's the rational thing to do... That is, once you verify that the effect is real.
 The CM fonts are great for actual math, mostly because of the matching math characters. The only other near-complete math fonts I know of are Lucida Bright and a Times version, neither of which are free. Most of the other free solutions just smoosh something like Palatino for text together with the CM math fonts or use an incomplete math font with CM fallbacks.
 This is the real reason.CM works pretty well right out of the box (and by default, so if you don't care that's what you get) for mathematics, very few fonts do and most of those are expensive.What people seem to forget is what a terrible, terrible state of affairs it was that drove Knuth to spend 10 years or whatever on this stuff. Prior to that the options universally sucked.Even now there really aren't many viable alternatives for typesetting mathematics, and TeX/LaTeX is by far the best of them. But it only comes with one (or two if you count Euler) with full symbol support.
 I hate the look of Computer Modern as well, finding its letters very thin and hard to read on mobile.I can't really convince anyone on aesthetics, but please look at how the default zoom level on Mobile Safari renders many of the bold characters as having this weird double-line effect:https://www.dropbox.com/s/enojel6ymuhfnlw/Photo%20Dec%2023%2...
 > I hate the look of Computer Modern as well, finding its letters very thin and hard to read on mobile.Doesn't look any good on my screen either, but it's a print font I'd expect it to become pretty at around 210 dpi.
 Oof. I think that's this issue: http://stackoverflow.com/questions/5069752/ios-4-2-webfont-t...I think the problem is that none of the TTFs include bold italic, so the browser generates a 'fake bold' of the italic. This time, MobileSafari is doing it oddly. Apparently a workaround is to fake bold yourself with -webkit-text-stroke (icky) and pretty workarounds would be to avoid bold italic or have a separate .ttf for it.
 Hmm, perhaps. But it also occurs on plain bold text https://www.dropbox.com/s/h2zy36l447mj8j7/Photo%20Dec%2023%2...
 (Might be that the .ttf didn't have CM Roman bold either, then.)
 Somebody always posts this comment re: Computer Modern, but I've never seen anybody offer up some of these strictly superior printing fonts (of which there are apparently many). Would you care to link some examples?
 I prefer Palatino when typesetting mathematics using latex. It looks nicer than Computer Modern and is super easy to use. Nowadays I use xelatex and actual fonts instead of staying stuck in the tex font ghetto.
 Similarly, I've had nice results combining Zapf Renaissance Antiqua text (via XeTeX fontspec) with Palatino maths and Optima headings.
 I've become a fan of bitstream charter lately[1], available through the mathdesign package \usepackage[bitstream-charter]{mathdesign}  I am not a designer, but I think it looks good with adobe's source code pro[2]: \usepackage{sourcecodepro}  [1] http://www.myfonts.com/fonts/bitstream/charter/ [2] http://store1.adobe.com/cfusion/store/html/index.cfm?event=d...
 The main problem isn't supporting other text fonts (including TTF), but the fact that those fonts don't properly support the symbols.So all in all it's a bit of a nasty aesthetic trade-off. There are several packages that attempt to create symbol sets to match things like palatino, with varying success. Some are just terrible. And there are a few commercially available ones that do support most if not all symbols, so if it's worth a few hundred dollars to you there is that route.Nothing has great solution for web, really. We're slowing moving from execrable to ugly but at least it is progress.
 You might try the fouriernc package. I don't know if it's superior, but I do find it easier on the eyes.
 Junicode is a far better classic serif, for example.
 You're not a real scientist unless you load Computer Modern into your copy of Word.
 You're not a real scientist if you use Word.
 I have yet to persuade a single chemist, earth scientist or environmental scientist to switch from Word to LaTeX. They can be persuaded to use Libre Office, however.
 In all fairness, the great-grant parent's post wasn't completely serious, nor was mine ;-)
 Yes, I knew that, but I didn't let that stop me!
 You need to talk to more actual scientists.
 I was going to disagree with the "cargo culting" statement, but then read the OP...
 Sweet! For some reason, I find Computer Modern to be perhaps the most beautiful serif font I've come across, handily beating out any competitor I've looked at.
 Even if you use a Computer Modern webfont, your page won't look even remotely as good as if it was produced using TeX. Browsers are lacking proper justification (Knuth-Plass line breaking), hyphenation (which kind of exists in CSS3), microtype optimizations (e.g. hanging punctuation) and automatic ligatures. There are some hacks [1] to solve these issues, but easy immaculate typography on the web is currently a no-go.
 Here's an article typeset in Computer Modern that was recently on the HN frontpage: http://swannodette.github.io/2013/12/17/the-future-of-javasc...Great article, but ZOMG is the typesetting atrocious! Look at the kerning between F and u in Future, and a and S in JavSscript. So, so bad.Knuth's contribution to typography was great for its time but with so many excellent free fonts available we have moved beyond the need for Computer Modern.
 Do these kerning problems have anything to do with the design of Computer Modern or with TeX? I don't think so; whatever you're seeing on that page results from the interaction of your browser, the markup, and the MathJax scripts.
 A bigger kern on the 'f' in 'future' would create a ligature. I suspect the web font and, more importantly, the HTML creator would not perform the substitution.
 Knuth's contribution to typography was far greater than a single font. Just saying. I'm curious to see that article actually typeset with his work.
 I use Computer Modern Typewriter Oblique (which is plain slanted) for my font in terminals and text editors. I really like how it looks. Unfortunately, some IDEs like IntelliJ ignore the oblique part and print the characters upright. However oblique is compatible with syntax highlighting that uses italics, because the true italic form of CM Typewriter resembles a script typewriter.Anyway, I always consider adding CM Typewriter Oblique to lists of the best monospaced fonts, but consider that maybe it will come across as too "hipster".
 I really dislike Computer Modern.I think it is an amateur typeface. Its italic glyphs are at different angles from one another. None of its bowls are consistent. It has strange and discordant differences in thicknesses across letters. The serif fonts are mangled in kerning and positioning in really weird ways. And the roman is extremely wide, extremely thin, and surprisingly hard to read when used for its primary purpose: papers.I think CM is predominant in TeX not because it's a good looking typeface. It's not predominant in TeX because it's nicely compatible with provided math symbols (which it is). CM is predominant only because for a very, very long time it was the only option available, and so people got used to scientific papers being "supposed" to look like that.But this is not a field known for its typesetting aesthetics: heck even as late as 2003 the large majority of these papers were still using the CM bitmaps rather than vector fonts, resulting in an unreadable mess when converted to PDF files. Tables are written so as to absolutely maximize the number of horizontal and vertical rule lines you can possibly stuff into a text table. The ACM's official style file is so awful and broken that multiple style files have been created to secretly patch it. Some have historically been filled with swear words. And I cannot count the number of papers nowadays which write things like $foo$, not realizing that this de-kerns the letters.Also, it appears the version from this link is missing its kerning.
 What might a paper use $foo$ for? Aside from a product of three variables which presumably shouldn't be kerned
 A multi-letter variable name.
 I think that most of what I appreciate about Computer Modern is that it sends the neighborhood font nerds into fits of white-hot rage every time I use it.
 This is very cool and will allow for a consistent appearance of book math content both online and offline.Something about the cm fonts gives them an air of respectability.Thx for porting these fonts!
 Glad to hear it. I've been thinking about blogging a read-through of Knuth, and I wanted to use the font as an homage.
 I absolutely love the "Bright" font, and have immediately started using it [1]. It didn't quite look right on the headings though, so I'll stick with Open Sans for those.
 edit: This is my connection! Sorry.http://imgur.com/KovolXbUsing Chrome (latest?) on Vista. Pink blobs are near, not on, flaws.
 Chrome beta is doing this to me on a lot of sites that load Web fonts. It's like it laid out the page using the metrics from the Web font, but then rendered it using a system fallback font.