Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using Ubuntu 12.04 with some KDE programs: kate and yakuake. Neither of these programs will render bold font. Instead, the font appears as "Regular". How can I fix this?

The image below shows an example of Kate rendering python with the stock python highlighting (the colors are inverted using CompizConfig Settings Manager's Negative option). The following words should have appeared bold:

  • class
  • def
  • __init__
  • lambda
  • +
  • print

Kate

Similarly Yakuake (or perhaps, the underlying Konsole) is not rendering bold. My LS_COLORS includes: di=01;34 (bold blue)

Yakuake

Below is my gnome-terminal rendering bold fonts just fine.

Terminal

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

It's been a while since you asked but I had the same problem and got to the bottom of it.

Short version

$ sudo rm /etc/fonts/conf.d/60-droid-sans-mono-fonts.conf (this is just a symlink so no actual configuration files are lost).

Long version

The package ttf-droid got replaced by fonts-droid. With that the symlink 60-ttf-droid-sans-mono-fonts.conf in the folder /etc/fonts/conf.d/ got renamed to 60-droid-sans-mono-fonts.conf. That means that the configuration in that file is now read before all configuration in 60-latin.conf and thus overriding it. The font alias Monospace (which is used by default in Yakuake and Kate) is defined as alias to DejaVu Sans Mono in 60-latin.conf, but Droid Sans Mono in 60-droid-sans-mono-fonts.conf. Incidentally, that font does not have a bold version, at least not the files in the fonts-droid package. So everywhere where Yakuake and Kate are supposed to render bold letters the rendering falls back to the regular version of the font.

If you do not want to change the setting system wide you could instead add your own alias to Monospace in ~/.fonts.conf. This should work:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>DejaVu Sans Mono</family>
    </prefer>
  </alias>
</fontconfig>

You can take a look at all the files in /etc/fonts/conf.avail and the fonts.conf manpage to see what else you can put into your .fonts.conf.

share|improve this answer
    
That worked for me. I just moved it to 60-droid-sans-mono-fonts.conf.backup just in case. –  Doran Sep 4 '12 at 14:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.