0

I'm looking at a website that attempts to display text in the Palatino font. This is not installed on my system. I'm not sure if it's even possible to get it in Linux. (FWIW I have ttf-mscorefonts-installer installed.)

In any case, the fallback font rendered horribly in Firefox, as shown in the screenshot.

palantino in firefox

As you can see, the height of characters vary. For example, in "enslave", the a is shorter than the v. This page renders fine in Chromium. I found an old bug that was supposedly fixed three years ago, so I'm not sure if it's something odd with my system, or just a regression.

How can I fix this problem?

==EDIT==

I already have texlive-fonts-recommendedtexlive-fonts-recommended installed on my system, which supposedly contains Palatino, but I can't find it in Font Manager.

Sparhawk
  • 6,969

2 Answers2

2

As far as I know this is a hinting issue. Try putting this into a new file in ~/.config/fontconfig/conf.d, like 20-autohint.conf:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
    <match target="pattern">
        <test name="family">
            <string>URW Bookman L</string>
        </test>
        <edit name="autohint" mode="assign">
            <bool>true</bool>
        </edit>
    </match>
    <match target="pattern">
        <test name="family">
            <string>URW Chancery L</string>
        </test>
        <edit name="autohint" mode="assign">
            <bool>true</bool>
        </edit>
    </match>
    <match target="pattern">
        <test name="family">
            <string>URW Gothic L</string>
        </test>
        <edit name="autohint" mode="assign">
            <bool>true</bool>
        </edit>
    </match>
    <match target="pattern">
        <test name="family">
            <string>URW Palladio L</string>
        </test>
        <edit name="autohint" mode="assign">
            <bool>true</bool>
        </edit>
    </match>
</fontconfig>

If you have an older system and this doesn't work try putting it into the file ~/.fonts.conf.

0

Another solution I've round recently is to install Infinality fonts, which fixes this problem without the file mentioned by Jan Larres. I've now using Arch, but there's no reason it shouldn't work in Ubuntu.

Sparhawk
  • 6,969