Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The Fontconfig documentation is fairly opaque. I want applications looking up the 'Helvetica' family to instead receive the 'Helvetica LT Std' family and display that font, browsers in particular. The latest XML file I wrote to ~/.fontconfig/fonts.conf was


    <match target="pattern">
        <test name="family" target="default" compare="eq">
        <edit name="family" mode="assign">
            <string>Helvetica LT Std</string>


What am I doing wrong and what would be a correct way to express this substitution?

share|improve this question

This works for me to replace Arial with Ubuntu

<!--?xml version="1.0"?>-->
<!--DOCTYPE fontconfig SYSTEM "fonts.dtd">-->
<!-- ~/.fonts.conf for per-user font configuration -->
    <test name="family"><string>Arial</string></test>
    <edit name="family" mode="prepend" binding="strong">

I found fc-match to be super helpful.

Also, I am on Precise so I use ~/.fonts.conf. In Quntal I understand you should use ~/.config/fontconfig/fonts.conf

share|improve this answer

That's exactly the same substitution I'm using! This is my configuration, but it only works when the specified font is not available. If the specified font was accessible by fontconfig, named Helvetica, the alias would not apply. However this has been working correctly on all my Ubuntu installations, so I recommend it before using the match tag.


<!-- Excerpt -->

            <family>Helvetica LT Std</family>

<!-- Excerpt -->

share|improve this answer

Your Answer


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.