summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-06-02 17:14:57 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-06-02 17:14:57 -0700
commit9c1528619103e838667736b470536d5c6745d2ac (patch)
treee1053276ec9430ff1c93b8b7051cf694d3663506
parent1c8a0e15c03d0f3ff4c953cd843ac00de00a3ad9 (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.conf12
-rw-r--r--Makefile.am8
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: