Opened 8 years ago

Closed 8 years ago

#79 closed task (fixed)

fontconfig: Add default font substitutions

Reported by: dmik Owned by:
Priority: major Milestone:
Component: fontconfig Version:
Severity: medium Keywords:
Cc:

Description

The upstream version of fontconfig has no knowledge about OS/2 specifics (yet). In particular, the current version of freetype for OS/2 doesn't support native OS/2 bitmap fonts, including WarpSans?. There is a TTF replacement by Alex Taylor though, called Workplace Sans, which is used by some applications instead of WarpSans? (e.g. by Firefox). Back then, the replacement was hardcoded into applications themselves (and later in fontconfig_os2) but this makes no sense with the full version of fontconfig as it has an excellent mechanism to configure such substitutions dynamically in fonts.conf.

Change History (5)

comment:1 Changed 8 years ago by dmik

Besides replacing all WarpSans? requests with Workplace Sans, we should deal with the defaults for Japanese systems. The old fontconfig_os2 code contained some hard-coded substitutions for that, check here: source:/fontconfig_os2/trunk/src/fontconfig.c?rev=1188#L1407.

comment:2 Changed 8 years ago by dmik

Type: taskdefect

With the full fontconfig power this seems to be as simple as adding

<alias binding="same">
  <family>WarpSans</family>
  <default><family>Workplace Sans</family></default>
</alias>

to fonts.conf (or to conf.d).

I will do it via a separate conf file in conf.d.

comment:3 Changed 8 years ago by dmik

Type: defecttask

comment:4 Changed 8 years ago by dmik

This is fixed by r1216. Note that we have some visual difference in Mozilla when rendering Workplace Sans in menus compared to the old fontconfig (or maybe the old rendered that didn't use pango). In particular, it seems that the height of the font is such that it is drawn closer to the top boundary (and farer from the bottom one), i.e. the font looks like it's vertically mis-centered a bit. I recall that I saw some +1px fix for that but can't observe it now. May be it's a problem of Workplace Sans metrics and needs to be fixed in the font. Anyway, it has nothing to do with this task and is about to be investigated elsewhere.

comment:5 Changed 8 years ago by dmik

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.