<?xml version="1.0" encoding="UTF-8" ?> <!-- -*- xml -*- vim:set ft=xml sw=2 et:

  Updated 121108 PeterG <pg_freesw {at} freesw.for.sabi.co.UK>
-->
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <!-- Documentation: http://FontConfig.org/fontconfig-user.html -->

<!--
# DON'T USE XFT2! It is client side only and sends bitmaps to the
# X server. This breaks one of the fundamental design properties
# of X, that resources are shared in the server, not the clients,
# so that network operation is consistent and speedy. Also, writing
# text becomes writing pixmaps, and text windows come image windows,
# and every text based application becomes a little Gimp. Consider
# the implications for network bandwidth and memory use.

# Also, if your reason for using Xft2 is antialiasing, think again:
# antialiasing makes your font fuzzy, and strains the focusing
# mechanism of the eyes, which relies on sharp boundaries (and
# different focusing planes for different colors).

# WARNING: using Xft2 with some releases of NVidia drivers crashes
# 11, either disable RENDER extension acceleration or RENDER entirely.

  FontConfig is actually somewhat nice, but even if the two are not
  necessarily related, it almost always implies Xft2.
-->

  <!--
#   Font directory path. Ensure that '/etc/fonts/local.conf',
#   '/etc/X11/XF86Config' (and maybe '/etc/X11/XftConfig') match.
  -->

  <dir>/usr/share/fonts/X11/misc</dir>
  <dir>/usr/share/fonts/X11/100dpi</dir>
  <dir>/usr/share/fonts/X11/75dpi</dir>

  <dir>/usr/local/share/fonts</dir>
  <dir>/usr/share/ghostscript/fonts</dir>

  <dir>/com/share/font/pcf</dir>
  <dir>/loc/share/font/pcf</dir>

  <dir>/com/share/font/ps1</dir>
  <dir>/loc/share/font/ps1</dir>

  <dir>/usr/share/fonts/type1</dir>
  <dir>/usr/share/fonts/X11/Type1</dir>

  <dir>/com/share/font/ttf</dir>
  <dir>/loc/share/font/ttf</dir>

  <dir>/usr/share/fonts/truetype</dir>
  <dir>/usr/share/fonts/X11/TrueType</dir>

  <!-- Processing logic:
    * First pass takes an input pattern name and resolves it by a
      process of 'pattern' matching to the closest actual font name
      known, typically with regard to typographical properties.

    * Second pass then takes the selected font name and modifies it,
      typically as to rendering properties.

    * Note the subtle differences in semantics in the 'mode' attribute
      of 'edit', especially depending on whether the edited property
      matched or not.
  -->

  <!-- http://Fontconfig.org/fontconfig-user.html

    <families>[-<point sizes>][:<name1>=<values1>]+
  -->

  <!-- Properties:
    Note: 'scalable' is an attribute of the font _request_, 'outline' is
      whether the _resulting_ font is actually an outline.

    outline:		true|false
    scalable:		true|false
    bitmapenabled:	true|false

    file:		<string>
    index:		<int>

    fontformat:         PCF|TrueType|Type 1
    rasterizer:		<string>

    fullname:           <string>
    fullnamelang:       ll[-CC]
    fontversion:        <string>
    capability:         <string>

    foundry:		<string>
    family:		<string>
    familylang:         ll[-CC]
    style:		(light|medium|demibold|bold|black|roman|italic|oblique)+
    stylelang:          ll[-CC]
    weight:		light|medium|demibold|bold|black
    slant:		roman|italic|oblique

    # From 'fcfreetype.c', list of properties that are recognized if
    # found in the 'style' attribute:
    # weight:
    #   thin|extralight|ultralight|light|book|regular|normal|medium
    #   |demibold|demi|semibold|extrabold|superbold|ultrabold|bold
    #   |ultrablack|superblack|extrablack|<ultra|black|heavy
    # slant:
    #   italic|kursiv|oblique
    # width:
    #   ultracondensed|extracondensed|semicondensed|condensed|normal
    #   |semiexpanded|extraexpanded|ultraexpanded|expanded|extended
    # decorative:
    #   shadow|caps|antiqua|romansc|embosed|dunhill

    lang:		ll[-CC]
    charset:		ll[-CC]

    pixelsize:		<double>
    size:		<double>
    dpi:		<double>

    spacing:		proportional|mono|charcell
    minspace		true|false

    embolden:           true|false
    scale:		<double>
    aspect:		<double>
    matrix:		<double> <double> <double> <double>

    hinting:		true|false
    autohint:		true|false
    # http://weirdfellow.wordpress.com/2010/07/25/valid-autohinting-hinting-style-options/
    # 'hintnone'                disables both 'hinting' and 'autohint'
    # 'hintslight'              disables 'hinting' and turns on 'autohint'.
    # 'hintmedium'/'hintfull'   switch on the font hints if 'autohint' is off.
    hintstyle:		hintnone|hintslight|hintmedium|hintfull

    antialias:		true|false
    rgba:		none|rgb|bgr|vrgb|vbgr|unknown
    lcdfilter:          lcdnone|lcddefault|lcdlight|lcdlegacy|lcdfilterlegacy

    globaladvance:	true|false
    verticallayout:	true|false

    ftface:		<FT_Face>
  -->

  <!-- Priority order of properties (higher to lower):
    foundry, charset, family, lang, spacing, pixelsize,
    style, slant, weight, antialias, rasterizer, outline
  -->

  <!-- Matching syntax:

    NOTE: 'pattern' means the match is against an input pattern,
	  'font' that it is against the selected output font.

    <match target="font|pattern">
      <test name="..." qual="any|all"
	  compare="(less|more)[_eq]|[not_](eq|contains)"
	<(const|int|bool|double|matrix|string|name)>....</...>
      </test>

      <edit name="..." binding="weak|same|strong"
	  mode="(assign[_replace]|prepend[_first]|append[_last]">
	<if>... ... ...</if>
	<not>...</not>
	<(or|and)>... ...</...>
	<(less|more)[_eq]|[not_]eq>... ...</...>
	<(plus|minus|times|divide)>... ...</...>
	<(int|double|string|bool|matrix|name|const)>...</...>
      </edit>
    </match>

    Mode		With 'test'		Without 'test'

    'assign'		Replace matching value	Replace all values
    'assign_replace'	Replace all values	Replace all values
    'prepend'		Insert before matching	Insert at head of list
    'prepend_first'	Insert at head of list	Insert at head of list
    'append'		Append after matching	Append at end of list
    'append_last'	Append at end of list	Append at end of list
  -->

  <!--
    It is really quite important to have a default font name even
    if very weak else strange things can happen like unknown fonts
    being substituted by 'Marlett' (a dingbats fonts).
   -->
  <match target="pattern">
    <edit name="family" mode="append_last" binding="weak">
      <string>serif</string>
    </edit>
  </match>

  <!-- Disable antialiasing for specific (well hinted) fonts -->
  <!-- Disable autohinting too, assuming that the bytecode interpreter
    is available. -->
<!--
  <match target="pattern">
    <test name="family" compare="eq">
      <!== DejaVu ==>
      <string>DejaVu Sans</string>
      <string>DejaVu Serif</string>
      <string>DejaVu Sans Mono</string>
      <string>DejaVu Sans Light</string>
      <string>DejaVu Sans Condensed</string>
      <string>DejaVu Serif Condensed</string>
      <!== Microsoft web fonts ==>
      <string>Andale Mono</string>
      <string>Arial Black</string>
      <string>Arial</string>
      <string>Comic Sans MS</string>
      <string>Courier New</string>
      <string>Georgia</string>
      <string>Impact</string>
      <string>Times New Roman</string>
      <string>Trebuchet MS</string>
      <string>Verdana</string>
      <string>Webdings</string>
      <!== Microsoft Windows 2000 fonts ==>
      <string>Abadi MT Condensed Extra Bold</string>
      <string>Arial Rounded MT Bold</string>
      <string>Lucida Console</string>
      <string>Lucida Sans Unicode</string>
      <string>Marlett</string>
      <string>Microstyle Bold Extended ATT</string>
      <string>Palatino Linotype</string>
      <string>Symbol</string>
      <string>Tahoma</string>
      <string>Verdana Ref</string>
      <string>Wingdings</string>
      <!== Agfa Monotype fonts ==>
      <string>Albany MT</string>
      <string>Andale Sans</string>
      <string>Andy MT</string>
      <string>Bell MT</string>
      <string>Cumberland MT</string>
      <string>Monotype Sorts</string>
      <string>Segoe</string>
      <string>Thorndale AMT</string>
    </test>

<!==
    <edit name="antialias"
      binding="weak" mode="append_last"><bool>false</bool></edit>
==>
    <edit name="hintsytle"
      binding="weak" mode="append_last"><const>hintslight</const></edit>
    <edit name="autohint"
      binding="weak" mode="append_last"><bool>false</bool></edit>
  </match>
-->

  <!--
    Tweak the font selection matching process.
  -->

  <!-- Do not prefer outlines -->
<!--
  <match target="pattern">
    <edit name="prefer_outline"
      binding="weak" mode="assign"><bool>false</bool></edit>
  </match>
-->

  <!-- Default size 10 points -->
  <match target="pattern">
    <edit name="size" binding="weak" mode="append"><double>10</double></edit>
  </match>

  <!-- Ensure no fonts are too small in points or pixels -->
  <match target="pattern">
    <test name="size" compare="less"><double>7</double></test>
    <edit name="size" mode="prepend"><double>7</double></edit>
  </match>
  <match target="font">
    <test name="pixelsize" compare="less"><double>8</double></test>
    <edit name="pixelsize" mode="prepend"><double>8</double></edit>
  </match>

  <!--
    Setting generic options like antialiasing or minimum font size.
    The same can can be done for specific font families.
  -->

  <match target="font">
    <edit name="hinting" binding="weak" mode="append_last"><bool>true</bool></edit>
    <edit name="autohint" binding="weak" mode="append_last"><bool>false</bool></edit>
    <edit name="hintstyle" binding="weak" mode="append_last"><const>hintfull</const></edit>
  </match>
  <match target="font">
    <edit name="antialias" binding="weak" mode="append_last"><bool>true</bool></edit>
    <edit name="rgba" binding="weak" mode="append_last"><const>none</const></edit>
    <edit name="lcdfilter" binding="weak" mode="append_last"><int>2</int></edit>
  </match>

  <!--  When antialiasing usually the autohinter gives better results -->

  <match target="font">
    <test name="antialias" compare="eq"><bool>true</bool></test>
    <edit name="autohint" mode="append"><bool>true</bool></edit>
  </match>
<!--
-->

  <!--  Antialiasing only for small or large fonts -->
<!--
  <match target="font">
    <test name="antialias" compare="eq"><bool>true</bool></test>
    <test name="size" compare="more"><double>8</double></test>
    <test name="size" compare="less"><double>13</double></test>
    <edit name="antialias" mode="append"><bool>false</bool></edit>
  </match>
-->
<!--
  <match target="font">
    <test name="antialias" compare="eq"><bool>true</bool></test>
    <test name="pixelsize" compare="more"><double>10</double></test>
    <test name="pixelsize" compare="less"><double>16</double></test>
    <edit name="antialias" mode="append"><bool>false</bool></edit>
  </match>
-->

</fontconfig>
