<p>Hi guys,
I notice that on the Go website all the Go code is formatted in a specific font. This is the same font used in the code examples in "Programming in Go" by Kernighan and Donovan. Anyone know what it is?</p>
<hr/>**评论:**<br/><br/>aaaqqq: <pre><p>It's Inconsolata, monospace. btw, you can right click the text and click "inspect element" to find details like these.</p>
<p>Edit: The code on the homepage uses Menlo, monospace while that on the tour site uses Inconsolata, monospace.</p></pre>intermernet: <pre><p>FYI: the code samples in K&D (printed edition) are, as far as I can tell, Consolas. Very similar to Inconsolata (Used on the tour page), but not open source. I think it's owned by Microsoft.</p>
<p>From the copyright notice of the book:</p>
<p>"Typeset by the authors in Minion Pro, Lato and Consolas, using Go, groff, ghostscript, and a host of other open-source Unix tools. Figures were created in Google Drawings."</p></pre>_ben_lowery: <pre><p>If you like Menlo there is a fork of it that was modernised and tweaked for programming that I really like called Meslo.</p>
<p><a href="https://github.com/andreberg/Meslo-Font" rel="nofollow">https://github.com/andreberg/Meslo-Font</a></p></pre>rjw57: <pre><blockquote>
<p>Hi guys, I notice that on the Go website all the Go code is formatted in a specific font.</p>
</blockquote>
<p>Is there a strong reason you couldn't use your browser's "inspect element" on a bit of code on the website and find out? Having just done so, the CSS on <pre> elements is "font-family: 'Inconsolata', monospace;".</p></pre>errydaymofo: <pre><p>Evidently he was not aware you could do that, otherwise he obviously would have done so.</p></pre>lapingvino: <pre><p><a href="https://xkcd.com/1053/">https://xkcd.com/1053/</a></p></pre>xkcd_transcriber: <pre><p><a href="http://imgs.xkcd.com/comics/ten_thousand.png" rel="nofollow">Image</a></p>
<p><strong>Title:</strong> Ten Thousand</p>
<p><strong>Title-text:</strong> Saying 'what kind of an idiot doesn't know about the Yellowstone supervolcano' is so much more boring than telling someone about the Yellowstone supervolcano for the first time.</p>
<p><a href="http://www.explainxkcd.com/wiki/index.php/1053#Explanation" rel="nofollow">Comic Explanation</a></p>
<p><strong>Stats:</strong> This comic has been referenced 5671 times, representing 6.1918% of referenced xkcds.</p>
<hr/>
<p><sup><a href="http://www.xkcd.com" rel="nofollow">xkcd.com</a></sup> <sup>|</sup> <sup><a href="http://www.reddit.com/r/xkcd/" rel="nofollow">xkcd sub</a></sup> <sup>|</sup> <sup><a href="http://www.reddit.com/r/xkcd_transcriber/" rel="nofollow">Problems/Bugs?</a></sup> <sup>|</sup> <sup><a href="http://xkcdref.info/statistics/" rel="nofollow">Statistics</a></sup> <sup>|</sup> <sup><a href="http://reddit.com/message/compose/?to=xkcd_transcriber&subject=ignore%20me&message=ignore%20me" rel="nofollow">Stop Replying</a></sup> <sup>|</sup> <sup><a href="http://reddit.com/message/compose/?to=xkcd_transcriber&subject=delete&message=delete%20t1_cxu0771" rel="nofollow">Delete</a></sup></p></pre>rjw57: <pre><p>That would be a strong reason.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传