{"id":1099,"date":"2010-03-16T22:16:52","date_gmt":"2010-03-16T21:16:52","guid":{"rendered":"http:\/\/www.gamlor.info\/wordpress\/?p=1099"},"modified":"2021-03-11T09:45:38","modified_gmt":"2021-03-11T08:45:38","slug":"fixing-the-font-for-github-gists","status":"publish","type":"post","link":"https:\/\/www.gamlor.info\/wordpress\/2010\/03\/fixing-the-font-for-github-gists\/","title":{"rendered":"Fixing the Font for Github Gists"},"content":{"rendered":"<p>I\u2019ve switched to the <a href=\"http:\/\/gist.github.com\">Github Gist service<\/a> for my code examples. It\u2019s a great service: easy to use, the code is versioned and you can download it easily.<\/p>\n<p>However the default fonts make your eyes bleed, at least on my Windows machine. It suffers from heavy aliasing,\u00a0 so that you have trouble reading it. <a href=\"http:\/\/en.wikipedia.org\/wiki\/Cleartype\">Clear Type<\/a> doesn\u2019t seam to work. Here&#8217;s an example-rendering:<\/p>\n<p><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2010\/03\/github-gist-old-css.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1110\" title=\"github-gist-old-css\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2010\/03\/github-gist-old-css.png\" alt=\"\" width=\"423\" height=\"84\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2010\/03\/github-gist-old-css.png 423w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2010\/03\/github-gist-old-css-300x59.png 300w\" sizes=\"(max-width: 423px) 100vw, 423px\" \/><\/a><\/p>\n<p>Luckily it\u2019s easy to fix it by specifying another font in your CSS. I\u2019ve changed the font selection to prefer the beautiful <a href=\"http:\/\/en.wikipedia.org\/wiki\/Consolas\">Consolas<\/a> font<br \/>\n<script src=\"https:\/\/gist.github.com\/334515.js?file=gistfile1.css\"><\/script><noscript><pre><code class=\"language-css css\">.gist .gist-file .gist-data .gist-highlight pre{\n   font-family: &quot;Consolas&quot;, &quot;Courier New&quot;, Courier, &quot;Bitstream Vera Sans Mono&quot;, monospace;\n}<\/code><\/pre><\/noscript><br \/>\nAnd it looks much, much better.<\/p>\n<p><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2010\/03\/github-gist-new-css.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1109\" title=\"github-gist-new-css\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2010\/03\/github-gist-new-css.png\" alt=\"\" width=\"370\" height=\"77\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2010\/03\/github-gist-new-css.png 370w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2010\/03\/github-gist-new-css-300x62.png 300w\" sizes=\"(max-width: 370px) 100vw, 370px\" \/><\/a><\/p>\n<p>I haven\u2019t tested it yet on other platforms, but at least it better on Windows. When you know a good <a href=\"http:\/\/en.wikipedia.org\/wiki\/Monospaced_font\">monospaced-font<\/a> for your favorite platform tell me, I\u2019ll include it in my CSS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve switched to the Github Gist service for my code examples. It\u2019s a great service: easy to use, the code is versioned and you can download it easily. However the&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[1],"tags":[174,175],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1099"}],"collection":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/comments?post=1099"}],"version-history":[{"count":10,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1099\/revisions"}],"predecessor-version":[{"id":3870,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1099\/revisions\/3870"}],"wp:attachment":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/media?parent=1099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/categories?post=1099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/tags?post=1099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}