--- title: Fix: Gitg doesn't use monospace font in Ubuntu date: 2017-06-23 23:01:37.742932 UTC --- In my work, I always use Git as command line. But I often use a GUI program to have better view on version history. [Gitg](https://wiki.gnome.org/Apps/Gitg/) is my usual choice. Since the inclusion of Gtk3-based Gitg in Ubuntu, some annoying bugs have started to appear. One is that Gitg's source view doesn't respect Monospace font setting of the desktop environment. ![Imgur](http://i.imgur.com/S3CzTzY.png) I filed a bug [report](https://bugzilla.gnome.org/show_bug.cgi?id=773350) to Gitg developers, but it seems that it is Ubuntu theme problem, so no fix for Gitg is given. Looking more around, it is [confirmed](https://github.com/gtimelog/gtimelog/issues/81#issuecomment-170923964) that Ubuntu's theme, Ambiance, doesn't support `GtkTextView::monospace` of Gtk 3. A possible solution is that the application has to explicitly choose the font. But Gitg developers seem not to be active in this issue. I cannot wait them for a fix. So I look for hacking in Ambiance theme. Here is my fix. Look for the CSS files of Ambiance theme. My choice is the _/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css_ file. Add this code to the end of the file: ```css /* Fix Gitg source view */ .monospace { font-family: "Monospace"; } ``` Save the file and open Gitg again. Bravo, it works: ![Imgur](http://i.imgur.com/J4mbhqh.png) I've just filed a [bug report](https://bugs.launchpad.net/ubuntu/+source/ubuntu-themes/+bug/1700218) to Ubuntu. Hope this will be officially fixed soon.