dot/fonts.conf, dot/...: Abolish `MiscFixed6x13'; make `Fixed' work.
authorMark Wooding <mwooding@good.com>
Fri, 10 Apr 2015 14:19:25 +0000 (15:19 +0100)
committerMark Wooding <mwooding@good.com>
Tue, 14 Apr 2015 17:55:51 +0000 (18:55 +0100)
Rather detailed hacking to make `Fixed' actually work as a proper name
for the font, which you can actually use in configuration interfaces.

dot/fonts.conf
dot/gitconfig.in
dot/vimrc
dot/xinitrc

index 9c5eed9..a71e415 100644 (file)
@@ -5,16 +5,14 @@
 
   <!-- Hacking for the fixed font.
 
-       After many half-hearted attempts to make this work properly, I'm
-       finally settling on this approach: define MiscFixed6x13 as a
-       magic name for the right font, and then hack configuration files
-       as necessary to make them use it.
+       Firstly, make sure that Fixed fonts aren't filtered out when building
+       the font cache.  Secondly, arrange that requests for Fixed find the
+       Trad version by preference.
     -->
   <selectfont>
     <acceptfont>
       <pattern>
        <patelt name="family"><string>Fixed</string></patelt>
-       <patelt name="width"><int>87</int></patelt>
       </pattern>
     </acceptfont>
     <rejectfont>
     </rejectfont>
   </selectfont>
   <match target="pattern">
-    <test name="family"><string>MiscFixed6x13</string></test>
-    <test name="slant" compare="more_eq"><int>10</int></test>
-    <!-- edit name="size"><double>12</double></edit -->
-    <edit name="style"><string>Oblique SemiCondensed</string></edit>
-    <edit name="width"><int>87</int></edit>
-    <edit name="family"><string>Fixed</string></edit>
-    <edit name="foundry"><string>Trad</string></edit>
-    <edit name="dpi"><int>75</int></edit>
-    <edit mode="assign" name="pixelsize"><double>13</double></edit>
+    <test name="family"><string>Fixed</string></test>
+    <edit name="dpi" mode="prepend_first"><int>75</int></edit>
   </match>
   <match target="pattern">
-    <test name="family"><string>MiscFixed6x13</string></test>
-    <test name="weight" compare="more_eq"><int>150</int></test>
-    <!-- edit name="size"><double>12</double></edit -->
-    <edit name="style"><string>Bold SemiCondensed</string></edit>
-    <edit name="width"><int>87</int></edit>
-    <edit name="family"><string>Fixed</string></edit>
-    <edit name="foundry"><string>Trad</string></edit>
-    <edit name="dpi"><int>75</int></edit>
-    <edit mode="assign" name="pixelsize"><double>13</double></edit>
+    <test name="family"><string>Fixed</string></test>
+    <test name="size" compare="more_eq"><double>12</double></test>
+    <test name="size" compare="less_eq"><double>14</double></test>
+    <edit name="foundry" mode="prepend_first"><string>Trad</string></edit>
+    <edit name="size"><double>13</double></edit>
+    <edit name="pixelsize"><double>13</double></edit>
+    <edit name="width"><const>semicondensed</const></edit>
   </match>
   <match target="pattern">
-    <test name="family"><string>MiscFixed6x13</string></test>
-    <!-- edit name="size"><double>12</double></edit -->
-    <edit name="style"><string>SemiCondensed</string></edit>
-    <edit name="width"><int>87</int></edit>
-    <edit name="family"><string>Fixed</string></edit>
-    <edit name="foundry"><string>Trad</string></edit>
-    <edit name="dpi"><int>75</int></edit>
-    <edit mode="assign" name="pixelsize"><double>13</double></edit>
-  </match>
-
-  <match target="pattern">
-    <test name="family"><string>Symbol</string></test>
-    <edit name="foundry"><string>urw</string></edit>
+    <test name="family"><string>Fixed</string></test>
+    <test name="pixelsize" compare="more_eq"><double>10</double></test>
+    <test name="pixelsize" compare="less_eq"><double>14</double></test>
+    <edit name="foundry" mode="prepend_first"><string>Trad</string></edit>
+    <edit name="size"><double>13</double></edit>
+    <edit name="pixelsize"><double>13</double></edit>
+    <edit name="width"><const>semicondensed</const></edit>
   </match>
 
   <!-- Hacking for the symbol font.
index 47fa392..25f46cd 100644 (file)
 
 [gui]
        fontui = -family Sans -size 10
-       fontdiff = -family MiscFixed6x13 -size 10
+       fontdiff = -family Fixed -size 13
index 88fde61..96dfec9 100644 (file)
--- a/dot/vimrc
+++ b/dot/vimrc
@@ -7,7 +7,7 @@ set shiftwidth=2
 
 if &t_Co > 2 || has("gui_running")
   syntax on
-  set guifont=MiscFixed6x13\ 12
+  set guifont=Fixed\ 13
   hi Normal guifg=white guibg=black
   set background=dark
 endif
index 7aba2b9..1e1f56d 100755 (executable)
@@ -351,7 +351,7 @@ EOF
        exec "$0" wait nostart
        ;;
       :ask-run)
-       req "Shell command" .cmd.hist xcatch -FMiscFixed6x13 -- sh -c&
+       req "Shell command" .cmd.hist xcatch -F"Fixed 13" -- sh -c&
        ;;
       :ask-command)
        req "xinit command" .xinit.hist xatom set XINIT_COMMAND$atomtag&