{"id":154,"date":"2008-06-22T11:22:40","date_gmt":"2008-06-22T19:22:40","guid":{"rendered":"http:\/\/www.outflux.net\/blog\/archives\/2008\/06\/22\/bold-fonts-in-libvte-gnome-terminal-terminator\/"},"modified":"2008-07-11T09:50:11","modified_gmt":"2008-07-11T17:50:11","slug":"bold-fonts-in-libvte-gnome-terminal-terminator","status":"publish","type":"post","link":"https:\/\/outflux.net\/blog\/archives\/2008\/06\/22\/bold-fonts-in-libvte-gnome-terminal-terminator\/","title":{"rendered":"bold fonts in libvte (gnome-terminal, terminator)"},"content":{"rendered":"<p>A while back I <a href=\"http:\/\/www.outflux.net\/blog\/archives\/2007\/12\/12\/search-for-a-crisp-monospace-true-type-font\/\">complained about terminal fonts<\/a>.  In the end, I was shown that the real source of my pain was a <a href=\"http:\/\/bugzilla.gnome.org\/show_bug.cgi?id=54926\">7 year old gnome bug<\/a> where vte did not attempt to use bold fonts and always used double-strike instead.  For me, this was a show-stopper given my desire for using tiny bitmap fonts for my terminals.  Double-strike bolding made things unreadable.<\/p>\n<p>I finally had a solid chunk of time to dedicate to working on the plumbing needed for vte to support bold fonts sanely.  (I&#8217;ve attached all my patches to the bug linked above.)  I&#8217;m really quite happy &#8212; I can finally stop using &#8220;xterm&#8221; everywhere and fully switch to gnome-terminal and terminator for all their UTF8 goodness.  Now I just need to tweak gnome-terminal&#8217;s colors &#8212; things seem slightly washed out.<\/p>\n<p>For anyone else interested in using bitmap fonts in gnome-terminal, here is the final recipe (since digging through all the comments in the original blog post doesn&#8217;t make it entirely obvious):<\/p>\n<blockquote><p><code><\/p>\n<pre>\r\n$ mkdir -p ~\/.fonts\r\n$ cp \/usr\/share\/fonts\/X11\/misc\/7x14{,B}.pcf.gz ~\/.fonts\r\n$ cat &gt; ~\/.fonts.conf &lt;&lt;EOM\r\n&lt;?xml version=\"1.0\"?&gt;\r\n&lt;!DOCTYPE fontconfig SYSTEM \"fonts.dtd\"&gt;\r\n&lt;fontconfig&gt;\r\n\r\n  &lt;!-- \/usr\/share\/fonts\/X11\/misc\/7x14{,B}.pcf.gz copied to ~\/.fonts\/ --&gt;\r\n  &lt;selectfont&gt;\r\n    &lt;acceptfont&gt;\r\n      &lt;pattern&gt;\r\n        &lt;patelt name=\"family\"&gt;&lt;string&gt;fixed&lt;\/string&gt;&lt;\/patelt&gt;\r\n        &lt;patelt name=\"pixelsize\"&gt;&lt;int&gt;14&lt;\/int&gt;&lt;\/patelt&gt;\r\n      &lt;\/pattern&gt;\r\n    &lt;\/acceptfont&gt;\r\n  &lt;\/selectfont&gt;\r\n\r\n&lt;\/fontconfig&gt;\r\nEOM\r\n<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>At this point, you can verify that fontconfig sees your bitmap fonts:<\/p>\n<blockquote><p><code><\/p>\n<pre>\r\n$ fc-list | grep Fixed\r\nFixed:style=Bold\r\nFixed:style=Regular\r\n<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>Now just close all your gnome-terminals to get vte to reload the new fonts, and configure it to use the newly available font:<\/p>\n<blockquote><p><code><\/p>\n<pre>\r\n$ gconftool-2 -s \/apps\/gnome-terminal\/profiles\/Default\/font -t string \"Fixed 14\"\r\n$ gconftool-2 -s \/apps\/gnome-terminal\/profiles\/Default\/use_system_font -t bool false\r\n<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>Ta-da!<\/p>\n<p style='text-align:left'>&copy; 2008, <a href=\"https:\/\/outflux.net\/blog\/\">Kees Cook<\/a>. This work is licensed under a <a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\">Creative Commons Attribution-ShareAlike 4.0 License<\/a>.<br \/><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><img decoding=\"async\" alt=\"CC BY-SA 4.0\" style=\"border-width:0\" src=\"https:\/\/i.creativecommons.org\/l\/by-sa\/4.0\/88x31.png\" \/><\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>A while back I complained about terminal fonts. In the end, I was shown that the real source of my pain was a 7 year old gnome bug where vte did not attempt to use bold fonts and always used double-strike instead. For me, this was a show-stopper given my desire for using tiny bitmap [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"_links":{"self":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/154"}],"collection":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":0,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"wp:attachment":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}