1

For cursive fonts I have both the URW Z003 and Écolier Court fonts installed. I want to use Écolier Court, but fc-match cursive shows that Z0003 is being chosen. I can't remove the Z003 font package because it's a dependency of a number of software packages I want to keep. I've tried making a fontconfig conf file to change what's chosen but haven't had any luck.

The relevant fontconfig lines for URW Z003, in /etc/fonts/conf.d/61-urw-z003.conf, are:

  <alias>
    <family>cursive</family>
    <prefer>
      <family>Z003</family>
    </prefer>
  </alias>

  <alias>
    <family>Z003</family>
    <default>
      <family>cursive</family>
    </default>
  </alias>

The relevant fontconfig lines for Écolier Court, in /etc/fonts/conf.d/61-ecolier-court.conf, are

  <alias>
    <family>cursive</family>
    <prefer>
      <family>Écolier court</family>
    </prefer>
  </alias>

  <alias>
    <family>Écolier court</family>
    <default>
      <family>cursive</family>
    </default>
  </alias>

The fontconfig file I've written is:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>cursive</family>
    <prefer>
      <family>Écolier court</family>
    </prefer>
  </alias>
  <alias>
    <family>Écolier court</family>
    <prefer>
      <family>cursive</family>
    </prefer>
  </alias>
</fontconfig>

I've prefixed my fontconfig file name with both 00- and 99-, but in either case fc-match shows that fontconfig is always choosing Z003 when asked for a cursive font.

0

First, you have misconfigured one rule, you used

<prefer>
  <family>cursive</family>
</prefer>

Whereas, you should use

<default>
  <family>cursive</family>
</default>

Second, you might also have used a wrong family name. Generally, font names don't come with accents. Check the correct family name with

≻ fc-scan ecolier-court.ttf
        family: "Ecolier_court"(s)
        lang: aa|bi|fj|gv|ho|ia|id|ie|io|nr|om|so|sq|ss|st|sw|ts|uz|vo|xh|yap|zu|jv|kj|kwm|ms|ng|rn|rw|sg|sn|su|za(s)

If the family name there turned to be Ecolier_court, then you have to use that in your configuration.

Third, note that the version I downloaded from the net doesn't have the en language, which means if your $LANG is set to en fc-match cursive would never match this font. You can explicitly match fonts for a different language using fc-match cursive:lang=fr or env LANG=fr fc-match cursive e.g. depending on your shell.

There could be other reasons, but let's see whether these three would solve your issue first.

  • I tried all three of your suggestions simultaneously, but it made no difference. And the font file does indeed 1) list the family name as "Ecolier_court", and 2) not include en as a language. – Matthew Cline Jan 14 at 0:21
  • And you want to use it for the English language or another language? If for English, why not just download a version which has English support? The reason it doesn't cover English is missing important English characters – Munzir Taha Jan 14 at 4:23
  • The version here supports English e.g. – Munzir Taha Jan 14 at 4:38
  • It's better if you comment whether you tried the proposed solutions and whether you still have an issue. Ignoring the question asked won't serve the poster nor the community. – Munzir Taha Jan 17 at 5:17
  • Sorry, I was taking a break from computer stuff. I tried that font but it didn't help. I changed the fontconfig conf file to use the new family name "Ecolier", I tried making that particular conf file go first or last, and tried regenerating the fontconfig cache files, all to no avil. – Matthew Cline Jan 18 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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