diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-06-02 17:14:57 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-06-02 17:14:57 -0700 |
commit | 9c1528619103e838667736b470536d5c6745d2ac (patch) | |
tree | e1053276ec9430ff1c93b8b7051cf694d3663506 | |
parent | 1c8a0e15c03d0f3ff4c953cd843ac00de00a3ad9 (diff) |
Install a fontconfig snippet to force treating Luxi Mono fonts as monospaced
fontconfig detects multiple character advances in some of the Luxi Mono
fonts, so doesn't think they're monospaced. This causes problems when
running xterm -fa "Luxi Mono", since it adds :spacing=100 to the pattern
when requesting a font from fontconfig to prefer monospaced fonts.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | 42-luxi-mono.conf | 12 | ||||
-rw-r--r-- | Makefile.am | 8 |
2 files changed, 20 insertions, 0 deletions
diff --git a/42-luxi-mono.conf b/42-luxi-mono.conf new file mode 100644 index 0000000..7babe82 --- /dev/null +++ b/42-luxi-mono.conf @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- force fontconfig to treat the Luxi Mono fonts as monospaced, even + though it detects multiple character widths --> +<fontconfig> + <match target="scan"> + <test name="family"> + <string>Luxi Mono</string> + </test> + <edit name="spacing"><int>100</int></edit> + </match> +</fontconfig> diff --git a/Makefile.am b/Makefile.am index c709ad9..2417e91 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,6 +36,11 @@ FONT_FILES = \ fontdir = @FONTDIR@ font_DATA = $(FONT_FILES) +fontconfigdir = $(sysconfdir)/fonts/conf +actualconfigdir = $(fontconfigdir)/conf.d +availconfigdir = $(fontconfigdir)/conf.avail +availconfig_DATA = 42-luxi-mono.conf + EXTRA_DIST = $(FONT_FILES) COPYRIGHT.BH MAINTAINERCLEANFILES = ChangeLog INSTALL @@ -45,6 +50,9 @@ install-data-hook: $(MKFONTSCALE) $(DESTDIR)$(fontdir) @rm -f $(DESTDIR)$(fontdir)/font.dir $(MKFONTDIR) $(DESTDIR)$(fontdir) + mkdir -p $(DESTDIR)$(actualconfigdir) + @rm -f $(DESTDIR)$(actualconfigdir)/$(availconfig_DATA) + ln -s ../conf.avail/$(availconfig_DATA) $(DESTDIR)$(actualconfigdir) @RUN_FCCACHE@ distuninstallcheck: |