Barry SCHWARTZ (Barijo ŜVARC) (chemoelectric) wrote,

Stupid best friend fontconfig

I got fed up and have written a patch for fontconfig to make it friendlier to font powerusers such as me, Queen Elizabeth II, the remains of Bill Bixby, the rat Socrates, Flipper’s reflection in a mirror, Mechagodzilla, Mr. Clean, and the indentation of Eric Idle’s head on his pillow.

Some of the changes:

  • A bunch of things get changed to have "fontfig" in their names. Some things are left with names like "fontconfig", though.

  • Ignores Preferred Family and Preferred Style. These names cause too many troubles with programs that make assumptions about what constitutes a font family. (I consider this a bug in those programs, which include GIMP and Inkscape on Unix-like platforms.) Also this works around the most galling stupidity in fontconfig, its failure to treat Family-Style in pairs.

  • Microsoft platform. Only names for the Microsoft platform are recognized in TrueType and OpenType fonts. In particular, Mac names are ignored; like Preferred Family and Preferred Style, they cause trouble with programs that make assumptions about what constitutes a font family.

  • Exact matches: if you ask for something like "Gamera Font:style=Stomping Tokyo" and there is a TrueType or OpenType font with exactly those family and subfamily names, it will match. Letter-case and spaces are significant.

  • Changed precendence order. ‘Character set’ and ‘Language’ are moved way down in precedence; because of this change, there is now no difference between ‘weak’ and ‘strong’ Family bindings.
  • Synthetic italic and bold capability is off by default.

Maybe I'll also end up making changes to how Type 1 fonts are handled, but I forgot to look into that.

Fontfig is a hack; I have ideas on how to make a better variant of fontconfig, but it’s more work than I want to do right now. The most important change would be to treat Family-Style in pairs rather than as separate Family and Style lists. Configurable precedences and per-program settings would be nice.

Tags: crud factory font library, free font stuff

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded