Package: fontconfig
Version: 2.11.0-6.3
Severity: normal

fontconfig appears to ignore a user's fonts.conf <prefers> list if it's
in a Japanese locale. This might well be me failing to configure it
correctly; it's very confusing :-(

I have a ~/.config/fontconfig/fonts.conf which includes
 <alias>
  <family>serif</family>
  <prefer>
   <family>Source Serif Pro</family>
   <family>IPAMincho</family>
  </prefer>
 </alias>

with the aim that if a 'serif' font is asked for we prefer Source
Serif Pro, with IPAMincho as the next fallback for glyphs not in that
(the idea being to render English text/web pages with a nice font for
latin characters, and Japanese with a Japanese font).

In a UK locale this seems (according to fc-match) to have the
desired effect:

mnementh$ LC_CTYPE=en_GB.UTF-8 fc-match -a serif|head -10
SourceSerifPro-Regular.otf: "Source Serif Pro" "Regular"
SourceSerifPro-Light.otf: "Source Serif Pro" "Light"
SourceSerifPro-ExtraLight.otf: "Source Serif Pro" "ExtraLight"
SourceSerifPro-Semibold.otf: "Source Serif Pro" "Semibold"
SourceSerifPro-Bold.otf: "Source Serif Pro" "Bold"
SourceSerifPro-Black.otf: "Source Serif Pro" "Black"
fonts-japanese-mincho.ttf: "IPAMincho" "Regular"
ipam.ttf: "IPAMincho" "Regular"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
DejaVuSerif.ttf: "DejaVu Serif" "Book"

However, in a Japanese locale the results are different and
fontconfig seems to be ignoring the request to prefer the Source
Serif Pro font:

mnementh$ LC_CTYPE=ja_JP.UTF-8 fc-match -a serif|head -10
fonts-japanese-mincho.ttf: "IPA明朝" "Regular"
SourceSerifPro-Regular.otf: "Source Serif Pro" "Regular"
SourceSerifPro-Light.otf: "Source Serif Pro" "Light"
SourceSerifPro-ExtraLight.otf: "Source Serif Pro" "ExtraLight"
SourceSerifPro-Semibold.otf: "Source Serif Pro" "Semibold"
SourceSerifPro-Bold.otf: "Source Serif Pro" "Bold"
SourceSerifPro-Black.otf: "Source Serif Pro" "Black"
ipam.ttf: "IPA明朝" "Regular"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
DejaVuSerif.ttf: "DejaVu Serif" "Book"

The effect of this is that firefox renders some English web
pages with the ugly looking latin characters from IPAMincho,
rather than the font I asked it to prefer.

I can't see anything in /etc/fonts/conf.d which tells the
configuration to behave differently based on the language of
the text being rendered (nothing doing 'test name="lang'
like the examples in the fonts.conf manpage) so I'm confused
as to why this would happen, but in any case it seems wrong
that the system is overriding what the user is requesting.

thanks
-- PMM

-- System Information:
Debian Release: 8.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages fontconfig depends on:
ii  dpkg               1.17.26
ii  fontconfig-config  2.11.0-6.3
ii  libc6              2.19-18+deb8u3
ii  libfontconfig1     2.11.0-6.3
ii  libfreetype6       2.5.2-3+deb8u1

fontconfig recommends no packages.

fontconfig suggests no packages.

-- debconf information:
* fontconfig/subpixel_rendering: Automatic
* fontconfig/enable_bitmaps: false
* fontconfig/hinting_type: Native

Reply via email to