Monaco font not antialiased in some GTK apps

5

I have a strange issue with the Monaco font on Ubuntu Karmic. I have recently installed the Monaco font just to see what the hype is all about.

The problem that I am facing now is that is not antialiased in some GTK apps (namely in Firefox and Eclipse), but it is antialiased in KDE apps (konsole) and in Chromium. I have hinting set to slight.

Any help is appreciated.

Bartosz RadaczyƄski

Posted 2010-01-10T18:41:10.260

Reputation: 151

Answers

2

Use older monaco font instead of the latest one solved this issue for me.

kholis

Posted 2010-01-10T18:41:10.260

Reputation: 181

1

The font has an embedded bitmap version for certain font sizes. Turn it off in fontconfig:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

    <!-- ...other settings can be here... -->

    <match target="font">
        <test name="family">
            <string>Monaco</string>
        </test>
        <edit name="embeddedbitmap">
            <bool>false</bool>
        </edit>
    </match>

</fontconfig>

If you have fontconfig 2.10 or newer, put this in ~/.config/fontconfig/fonts.conf. With older versions, edit ~/.fonts.conf.

To change this system-wide, edit /etc/fonts/conf.d/fix-monaco.conf.


You can also disable embedded bitmaps for all fonts, by removing the <test ...> line. In my experience, embedded bitmaps are never useful; they always make the font ugly.

user1686

Posted 2010-01-10T18:41:10.260

Reputation: 283 655

0

In GTK applications, the system font is controlled by ~/.Xresources. But in Firefox, the page display is controlled by the fontconfig system, so you have to make settings in ~/.fonts.conf.

Monaco does look better on a Mac. OS X has very aggressive antialiasing and it is hard to duplicate that effect on other systems. The closest you can get on Linux is to make your settings:

sub-pixel antialiasing = on
hint strength = slight
lcdfilter = lcddefault

To use the lcdfilter feature, you need libcairo2 1.10+. Even then, it will not have an effect in Firefox, since it doesn't use that system for rendering pages.

user60598

Posted 2010-01-10T18:41:10.260

Reputation: 251