Advertisement
Guest User

brebs

a guest
Jul 4th, 2010
898
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 23.30 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <fontconfig>
  4.  
  5.  
  6.     <!-- Info:
  7.     Latest version:   http://forums.gentoo.org/viewtopic-p-6183606.html#6183606
  8.     xeffects thread:  http://forums.gentoo.org/viewtopic-t-511382.html
  9.     Alternative:      https://wiki.ubuntu.com/Fonts
  10.     http://wiki.archlinux.org/index.php/XOrg_Font_Configuration
  11.     http://antigrain.com/research/font_rasterization/index.html
  12.     http://freddie.witherden.org/pages/font-rasterisation/
  13.     http://fontconfig.org/fontconfig-user.html
  14.     Free fonts: http://www.design-by-izo.com/2010/06/07/8-excellent-fonts-for-screen-and-print/
  15.     -->
  16.  
  17.  
  18.     <alias>
  19.         <family>Times</family>
  20.         <prefer>
  21.             <family>Times New Roman</family>
  22.             <family>Times New Roman PS</family>
  23.             <family>Times Ten</family>
  24.             <family>Cambria</family>
  25.         </prefer>
  26.     </alias>
  27.  
  28.  
  29.     <!-- http://bugs.gentoo.org/show_bug.cgi?id=130466
  30.     Times: http://en.wikipedia.org/wiki/Times_Roman
  31.     Linux Libertine from http://sourceforge.net/projects/linuxlibertine/
  32.     Is important to have good, easily-readable default fonts for:
  33.     serif, sans-serif, monospace, Courier -->
  34.     <alias>
  35.         <family>serif</family>
  36.         <prefer>
  37.             <family>Times New Roman</family>
  38.             <family>Cambria</family>
  39.             <family>DejaVu Serif</family>
  40.             <family>Bitstream Vera Serif</family>
  41.             <family>Liberation Serif</family>
  42.             <family>Linux Libertine</family>
  43.         </prefer>
  44.     </alias>
  45.  
  46.     <!-- Corbel is ugly - don't use -->
  47.     <alias>
  48.         <family>sans-serif</family>
  49.         <prefer>
  50.             <family>DejaVu Sans</family>
  51.             <family>Bitstream Vera Sans</family>
  52.             <family>Verdana</family>
  53.             <family>Liberation Sans</family>
  54.         </prefer>
  55.     </alias>
  56.  
  57.     <!-- Examples: http://www.codestyle.org/css/font-family/sampler-Monospace.shtml
  58.     Used to show text email messages in Evolution, by default.
  59.     DejaVu Sans Mono is still the best. -->
  60.     <alias>
  61.         <family>monospace</family>
  62.         <prefer>
  63.             <family>DejaVu Sans Mono</family>
  64.             <family>Nimbus Mono L</family>
  65.             <family>Lucida Sans Typewriter</family>
  66.             <family>Consolas</family>
  67.             <family>Bitstream Vera Sans Mono</family>
  68.             <family>Liberation Mono</family>
  69.             <family>Andale Mono</family>
  70.         </prefer>
  71.     </alias>
  72.  
  73.     <!-- Common web font -->
  74.     <match target="pattern">
  75.         <test name="family">
  76.             <string>Helvetica</string>
  77.         </test>
  78.         <edit name="family" mode="prepend" binding="strong">
  79.             <string>Helvetica World</string>
  80.         </edit>
  81.     </match>
  82.  
  83.  
  84.     <!-- Replace Arial bold with a better-looking font - looks terrible at e.g. http://digg.com
  85.     Calibri is quite good.
  86.     ChaletBookTT is awful, found from http://www.identifont.com/
  87.     Also try "Arial Unicode MS" or "Arial MT": http://en.wikipedia.org/wiki/Arial_Unicode
  88.     Arial MT looks vertically squashed.
  89.     Aeriel from http://aur.archlinux.org/packages.php?ID=21892
  90.     i.e. ftp://ftp.fi.debian.org/pub/gentoo/distfiles/ttf-arkpandora-2.04.tgz
  91.     Liberation fontset: https://fedorahosted.org/releases/l/i/liberation-fonts/
  92.     PT Sans: http://www.paratype.com/public/ and http://www.fontstock.com/public/PTSans.zip
  93.     CartoGothic Std: http://www.fontsquirrel.com/fonts/download/CartoGothic-Std -->
  94.     <match target="pattern">
  95.         <test name="family">
  96.             <string>Arial</string>
  97.         </test>
  98.         <test compare="less" name="pixelsize">
  99.             <double>12</double>
  100.         </test>
  101.         <edit name="family" mode="prepend" binding="strong">
  102.             <string>CartoGothic Std</string>
  103.         </edit>
  104.     </match>
  105.  
  106.     <!-- Corbel and Candara are weird-looking, with dropped digits.
  107.     Grotesque MT is too wide.
  108.     PT Sans: http://www.paratype.com/public/ and http://www.fontstock.com/public/PTSans.zip -->
  109.     <match target="pattern">
  110.         <test name="family">
  111.             <string>Arial</string>
  112.         </test>
  113.         <test compare="less" name="pixelsize">
  114.             <double>18</double>
  115.         </test>
  116.         <test name="weight" compare="more">
  117.             <const>medium</const>
  118.         </test>
  119.         <edit name="family" mode="prepend" binding="strong">
  120.             <string>PT Sans</string>
  121.         </edit>
  122.     </match>
  123.  
  124.  
  125.     <!-- Prevent middle stroke of e from being raised too high -->
  126.     <match target="pattern">
  127.         <test name="family">
  128.             <string>Times New Roman PS</string>
  129.         </test>
  130.         <test compare="less" name="pixelsize">
  131.             <double>18</double>
  132.         </test>
  133.         <edit name="family" mode="prepend" binding="strong">
  134.             <string>Times New Roman</string>
  135.         </edit>
  136.     </match>
  137.  
  138.  
  139.     <!-- From:
  140.         http://repos.archlinux.org/wsvn/packages/fontconfig/trunk/
  141.         http://bugs.archlinux.org/task/15833
  142.         http://bugs.freedesktop.org/show_bug.cgi?id=18002
  143.         http://freedesktop.org/wiki/Software/poppler
  144.         http://bugs.gentoo.org/show_bug.cgi?id=303591
  145.  
  146.         Get urw-fonts from http://koji.fedoraproject.org/koji/packageinfo?packageID=905 -->
  147.     <match target="pattern">
  148.         <test name="family">
  149.             <string>ZapfDingbats</string>
  150.         </test>
  151.         <edit name="family" mode="prepend" binding="same">
  152.             <string>Dingbats</string>
  153.         </edit>
  154.     </match>
  155.  
  156.     <!-- Based on http://bugs.gentoo.org/show_bug.cgi?id=282151 -->
  157.     <match target="pattern">
  158.         <test name="family">
  159.             <string>NewCenturySchlbk</string>
  160.         </test>
  161.         <edit name="family" mode="append" binding="same">
  162.             <string>Century Schoolbook L</string>
  163.         </edit>
  164.     </match>
  165.  
  166.     <match target="pattern">
  167.         <test name="family">
  168.             <string>AvantGarde</string>
  169.         </test>
  170.         <edit name="family" mode="append" binding="same">
  171.             <string>URW Gothic L</string>
  172.         </edit>
  173.     </match>
  174.  
  175.  
  176.     <match target="pattern">
  177.         <test name="family">
  178.             <string>ZapfChancery</string>
  179.         </test>
  180.         <edit name="family" mode="append" binding="same">
  181.             <string>URW Chancery L</string>
  182.         </edit>
  183.     </match>
  184.  
  185.  
  186.     <!-- From suse-pre-user.conf in fontconfig-2.8.0-20.1.src.rpm from http://software.opensuse.org/search?baseproject=openSUSE%3AFactory&p=1&q=fontconfig
  187.     http://bugs.gentoo.org/show_bug.cgi?id=303591
  188.     https://bugs.freedesktop.org/show_bug.cgi?id=27653 -->
  189.     <match target="pattern">
  190.         <test name="family">
  191.             <string>symbol</string>
  192.         </test>
  193.         <edit name="family" mode="append" binding="strong">
  194.             <string>OpenSymbol</string>
  195.         </edit>
  196.         <edit name="family" mode="append" binding="strong">
  197.             <string>Standard Symbols L</string>
  198.         </edit>
  199.     </match>
  200.  
  201.  
  202.     <match target="pattern" name="family">
  203.         <test name="family" qual="any">
  204.             <string>fixed</string>
  205.         </test>
  206.         <edit name="family" mode="assign">
  207.             <string>monospace</string>
  208.         </edit>
  209.     </match>
  210.  
  211.  
  212. <!--
  213.   From suse-pre-user.conf in fontconfig-2.8.0-2.7.src.rpm from http://download.opensuse.org/factory/repo/src-oss/suse/src/
  214.   OpenSUSE Bugzilla #52167 and bugzilla #246804:
  215.   Some fonts like "Luxi Mono", and "Nimbus Mono L"
  216.   which are intended to be monospace are not detected as
  217.   monospace because they have a few glyphs with wrong width.
  218.   That is of course a bug in the fonts but this is difficult
  219.   to fix and sometimes even impossible because of license reasons.
  220.   For most purposes it is useful to force these fonts to be
  221.   detected as monospace because it doesn't matter much if only
  222.   a handful of rarely used glyphs has the wrong width.
  223. -->
  224.     <match target="scan" >
  225.         <test compare="contains" name="family">
  226.             <string>Luxi Mono</string>
  227.             <string>Nimbus Mono L</string>
  228.         </test>
  229.         <edit mode="assign_replace" name="spacing">
  230.             <const>mono</const>
  231.         </edit>
  232.     </match>
  233.  
  234.  
  235. <!-- From http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/fontconfig/current/SOURCES/20-mdv-CJK-dualwidth.conf?view=markup
  236.     and http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/fontconfig/current/SOURCES/25-mdv-CJK-disable-hinting.conf?view=log
  237.     https://bugs.freedesktop.org/show_bug.cgi?id=17267
  238.     We can't hint CJK fonts well, so turn off hinting for CJK fonts.
  239.     Some Asian fonts misadvertise themselves as monospaced when
  240.     in fact they are dual-spaced (half and full). This makes
  241.     FreeType very confused as it forces all widths to match.
  242.     Undo this magic by disabling the width-forcing code.
  243. -->
  244.     <match target="font">
  245.         <test target="pattern" name="lang" compare="contains">
  246.             <string>zh-tw</string>
  247.             <string>zh-cn</string>
  248.             <string>ja</string>
  249.             <string>ko</string>
  250.         </test>
  251.         <edit name="spacing">
  252.             <const>proportional</const>
  253.         </edit>
  254.         <edit name="globaladvance">
  255.             <bool>false</bool>
  256.         </edit>
  257.         <edit name="hinting" mode="assign">
  258.             <bool>false</bool>
  259.         </edit>
  260.     </match>
  261.  
  262.  
  263.     <!-- Reject bitmap fonts in favour of Truetype, Postscript, etc. -->
  264.     <selectfont>
  265.         <rejectfont>
  266.             <pattern>
  267.                 <patelt name="scalable">
  268.                     <bool>false</bool>
  269.                 </patelt>
  270.             </pattern>
  271.         </rejectfont>
  272.     </selectfont>
  273.  
  274.  
  275.     <!-- http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/fontconfig/current/SOURCES/26-mdv-no-embeddedbitmap.conf?view=markup
  276.     Japanese fonts: http://bbs.archlinux.org/viewtopic.php?id=91276
  277.     Calibri font: http://forums.fedoraforum.org/showthread.php?p=1045807#post1045807
  278.     Don't use bitmaps at all, because they look horrible. Enable them for individiual fonts and sizes, if needed. -->
  279.     <match target="font">
  280.         <edit name="embeddedbitmap" mode="assign">
  281.             <bool>false</bool>
  282.         </edit>
  283.     </match>
  284.  
  285.     <!-- This is only here in case it is useful sometime.
  286.     Example at http://www.codestyle.org/css/font-family/sampler-Monospace.shtml
  287.     Others from 25-no-bitmap-fedora.conf at:
  288.     http://distro.ibiblio.org/pub/linux/distributions/texstar/pclinuxos/apt/pclinuxos/2010/SRPMS.main/fontconfig-2.8.0-1pclos2010.src.rpm
  289.     <match target="font">
  290.         <test name="family" qual="any">
  291.             <string>Cambria</string>
  292.             <string>Monaco</string>
  293.             <string>Kochi Mincho</string>
  294.             <string>Kochi Gothic</string>
  295.             <string>Sazanami Mincho</string>
  296.             <string>Sazanami Gothic</string>
  297.         </test>
  298.         <edit name="embeddedbitmap" mode="assign">
  299.             <bool>false</bool>
  300.         </edit>
  301.     </match> -->
  302.  
  303.  
  304.     <!-- Ubuntu options:  lcdnone, lcddefault, lcdlight, lcdlegacy -->
  305.     <!-- hintnone, hintslight, hintmedium, hintfull -->
  306.     <!-- autohint off: https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/14310/comments/14 -->
  307.     <!-- Blurry fonts:  Try rgb, bgr, vrgb, vbgr for "rgba" -->
  308.     <!-- Blurry:  http://forums.gentoo.org/viewtopic-p-5060979.html#5060979 -->
  309.     <match target="font">
  310.         <edit name="rgba" mode="assign"><const>rgb</const></edit>
  311.         <edit name="autohint" mode="assign"><bool>false</bool></edit>
  312.         <edit name="antialias" mode="assign"><bool>true</bool></edit>
  313.         <edit name="hinting" mode="assign"><bool>true</bool></edit>
  314.         <edit name="hintstyle" mode="assign"><const>hintmedium</const></edit>
  315.         <edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>
  316.     </match>
  317.  
  318.  
  319.     <!-- Microsoft fonts, from http://bbs.archlinux.org/viewtopic.php?pid=728521 -->
  320.     <match target="font">
  321.         <test compare="eq" name="foundry">
  322.             <string>microsoft</string>
  323.         </test>
  324.         <edit name="hintstyle" mode="assign">
  325.             <const>hintfull</const>
  326.         </edit>
  327.     </match>
  328.  
  329.  
  330.     <!-- Greyscale for small fonts - not used
  331.     <match target="font">
  332.         <test name="pixelsize" compare="less_eq"><double>7</double></test>
  333.         <edit name="rgba"><const>none</const></edit>
  334.     </match>
  335.     -->
  336.  
  337.  
  338.     <!-- lcdlegacy.
  339.     Georgia bold & small: http://www.timesonline.co.uk/tol/news/
  340.     DejaVu Sans bold & small: http://foo-projects.org/git/?p=lunar/moonbase.git;a=shortlog -->
  341.     <match target="font">
  342.         <test name="family" qual="any">
  343.             <string>Courier</string>
  344.             <string>Courier New</string>
  345.             <string>DejaVu Sans</string>
  346.             <string>FreeSerif</string>
  347.             <string>Georgia</string>
  348.             <string>Helvetica</string>
  349.             <string>Nimbus Roman No9 L</string>
  350.             <string>Times New Roman</string>
  351.         </test>
  352.         <edit name="lcdfilter" mode="assign">
  353.             <const>lcdlegacy</const>
  354.         </edit>
  355.     </match>
  356.  
  357.  
  358.     <!-- lcdlight.
  359.     Lucida Grande at http://www.infoworld.com/d/adventures-in-it/it-personality-types-8-profiles-in-geekdom-313 -->
  360.     <match target="font">
  361.         <test name="family" qual="any">
  362.             <string>Lucida Grande</string>
  363.             <string>Helvetica World</string>
  364.         </test>
  365.         <edit name="lcdfilter" mode="assign">
  366.             <const>lcdlight</const>
  367.         </edit>
  368.     </match>
  369.  
  370.  
  371.     <!-- hintslight.
  372.     Baskerville: "Leave A Comment" at http://www.jamiesinz.com/2008/08/huay-tung-tao-reservoir/
  373.     Consolas: http://www.fedoraforum.org/forum/showthread.php?t=186789&page=7
  374.     Corbel and Constantia look far too bold, if not hintslight.
  375.     Times New Roman: http://www.billiardworld.com/glossary.html
  376.     Luxi Sans bold needs hintslight at http://market-ticker.denninger.net/ -->
  377.     <match target="font">
  378.         <test name="family" qual="any">
  379.             <string>Albany Std</string>
  380.             <string>Arial MT</string>
  381.             <string>Arial MT Std</string>
  382.             <string>Arial Special G1</string>
  383.             <string>Arial Unicode MS</string>
  384.             <string>Baskerville</string>
  385.             <string>CartoGothic Std</string>
  386.             <string>Comic Sans MS</string>
  387.             <string>Consolas</string>
  388.             <string>Constantia</string>
  389.             <string>Corbel</string>
  390.             <string>Helvetica World</string>
  391.             <string>Inconsolata</string>
  392.             <string>Lucida Grande</string>
  393.             <string>Luxi Sans</string>
  394.             <string>Nimbus Sans L</string>
  395.             <string>PT Sans</string>
  396.             <string>Sansation</string>
  397.             <string>Times New Roman</string>
  398.             <string>URW Palladio L</string>
  399.         </test>
  400.         <edit mode="assign" name="hintstyle">
  401.             <const>hintslight</const>
  402.         </edit>
  403.     </match>
  404.  
  405.  
  406.     <!-- hintfull
  407.     DejaVu Sans looks less fuzzy with hintfull, e.g. buttons at http://ultimateedition.info/ -->
  408.     <match target="font">
  409.         <test name="family" qual="any">
  410.             <string>Andale Mono</string>
  411.             <string>Arial</string>
  412.             <string>Arial Rounded MT Bold</string>
  413.             <string>DejaVu Sans</string>
  414.             <string>Impact</string>
  415.             <string>Liberation Mono</string>
  416.             <string>Liberation Sans</string>
  417.             <string>Liberation Serif</string>
  418.             <string>Linux Libertine</string>
  419.             <string>Microsoft SansSerif</string>
  420.             <string>MS Mincho</string>
  421.             <string>Vegur</string>
  422.         </test>
  423.         <edit mode="assign" name="hintstyle">
  424.             <const>hintfull</const>
  425.         </edit>
  426.     </match>
  427.  
  428.  
  429.     <!-- hintnone.
  430.     Arial Black bold: "e" is filled in, if not hintnone - http://www.gamesradar.com/pc/bejeweled-2-deluxe/news/opinion-man-beats-bejeweled-2-after-three-years-was-it-worth-it/a-2010043014175972070/g-2005120714414257238769 -->
  431.     <match target="font">
  432.         <test name="family" qual="any">
  433.             <string>Arial Black</string>
  434.         </test>
  435.         <test compare="less" name="pixelsize">
  436.             <double>50</double>
  437.         </test>
  438.         <edit mode="assign" name="hintstyle">
  439.             <const>hintnone</const>
  440.         </edit>
  441.     </match>
  442.  
  443.  
  444.     <!-- autohint.
  445.     Luxi Sans - http://market-ticker.denninger.net/
  446.     Some entries copied from http://www.infinality.net/blog/?p=10
  447.     Arial Black: http://www.wired.com/ -->
  448.     <match target="font">
  449.         <test name="family" qual="any">
  450.             <string>Arial Narrow</string>
  451.             <string>Bitstream Vera Serif</string>
  452.             <string>Courier10 BT</string>
  453.             <string>DejaVu LGC Sans Mono</string>
  454.             <string>DejaVu Sans Mono</string>
  455.             <string>DejaVu Serif</string>
  456.             <string>Delicious</string>
  457.             <string>District</string>
  458.             <string>Dutch801 Rm BT</string>
  459.             <string>Fontin Sans</string>
  460.             <string>FreeMono</string>
  461.             <string>FreeSans</string>
  462.             <string>FreeSerif</string>
  463.             <string>Gotham Book</string>
  464.             <string>Gotham Light</string>
  465.             <string>Gotham Medium</string>
  466.             <string>Helvetica</string>
  467.             <string>Helvetica LT Std</string>
  468.             <string>Lacuna</string>
  469.             <string>Lucida Console</string>
  470.             <string>Lucida Grande</string>
  471.             <string>Lucida Sans Unicode</string>
  472.             <string>Luxi Sans</string>
  473.             <string>Luxi Serif</string>
  474.             <string>MankSans</string>
  475.             <string>Metabook-Roman</string>
  476.             <string>MetaMedium-Roman</string>
  477.             <string>Miriam</string>
  478.             <string>Miso</string>
  479.             <string>MS Mincho</string>
  480.             <string>Myriad Pro</string>
  481.             <string>Myriad Web Pro</string>
  482.             <string>Nimbus Mono L</string>
  483.             <string>Nina</string>
  484.             <string>Ocean Sans Std</string>
  485.             <string>Swansea</string>
  486.             <string>Swiss721</string>
  487.             <string>Utopia</string>
  488.             <string>Vegur</string>
  489.             <string>Verdimka</string>
  490.         </test>
  491.         <edit name="autohint" mode="assign">
  492.             <bool>true</bool>
  493.         </edit>
  494.     </match>
  495.  
  496.  
  497.     <!-- From http://forums.gentoo.org/viewtopic-t-511382-start-650.html
  498.     To create difference between small Candara and small Candara bold -->
  499.     <match target="font">
  500.         <test name="family" qual="any">
  501.             <string>Candara</string>
  502.         </test>
  503.         <test compare="less_eq" name="size">
  504.             <double>10</double>
  505.         </test>
  506.         <test name="weight" compare="more">
  507.             <const>medium</const>
  508.         </test>
  509.         <edit name="embolden" mode="assign">
  510.             <bool>true</bool>
  511.         </edit>
  512.     </match>
  513.  
  514.  
  515.     <!-- From http://bugs.gentoo.org/show_bug.cgi?id=233729 -->
  516.     <match target="font">
  517.         <test name="family" qual="any">
  518.             <string>Andale Mono</string>
  519.             <string>Arial</string>
  520.             <string>Comic Sans MS</string>
  521.             <string>Georgia</string>
  522.             <string>Trebuchet MS</string>
  523.             <string>Verdana</string>
  524.         </test>
  525.         <test compare="less" name="weight">
  526.             <const>medium</const>
  527.         </test>
  528.         <test compare="less_eq" name="pixelsize">
  529.             <double>7</double>
  530.         </test>
  531.         <edit mode="assign" name="antialias">
  532.             <bool>false</bool>
  533.         </edit>
  534.     </match>
  535.  
  536.  
  537.     <!-- Tweak Arial bold at http://www.linux-gamers.net/
  538.     Because the top of f is cut off with hintfull and hintmedium.
  539.     But don't change the smaller Arial Bold at http://www.telegraph.co.uk/
  540.     hintnone is better than hintslight for letter-spacing of headings at http://www.linuxmint.com/blog/ -->
  541.     <match target="font">
  542.         <test compare="eq" name="family">
  543.             <string>Arial</string>
  544.         </test>
  545.         <test compare="more" name="weight">
  546.             <const>medium</const>
  547.         </test>
  548.         <edit mode="assign" name="hintstyle">
  549.             <const>hintmedium</const>
  550.         </edit>
  551.         <edit name="lcdfilter" mode="assign">
  552.             <const>lcdlight</const>
  553.         </edit>
  554.         <test compare="more_eq" name="pixelsize">
  555.             <double>14</double>
  556.         </test>
  557.         <test compare="less_eq" name="pixelsize">
  558.             <double>18</double>
  559.         </test>
  560.         <edit mode="assign" name="hintstyle">
  561.             <const>hintnone</const>
  562.         </edit>
  563.     </match>
  564.  
  565.  
  566.     <!-- Tweak Nimbus Sans L at:
  567.     http://unity3d.com/company/news/unity2.6-press.html - the sub-headings -->
  568.     <match target="font">
  569.         <test compare="eq" name="family">
  570.             <string>Nimbus Sans L</string>
  571.         </test>
  572.         <test compare="more" name="weight">
  573.             <const>medium</const>
  574.         </test>
  575.         <test compare="less_eq" name="pixelsize">
  576.             <double>14</double>
  577.         </test>
  578.         <edit mode="assign" name="hintstyle">
  579.             <const>hintnone</const>
  580.         </edit>
  581.     </match>
  582.  
  583.  
  584. <!--
  585.     From dejavu-fonts in Fedora
  586.     http://koji.fedoraproject.org/koji/packageinfo?packageID=1581
  587.  
  588.     /etc/fonts/conf.d/20-unhint-small-dejavu-serif.conf
  589.  
  590.     Disable hinting manually at smaller sizes (< 8ppem)
  591.     This is a copy of the Bistream Vera fonts fonts rule, as DejaVu is
  592.     derived from Vera.
  593.  
  594.     The Bistream Vera fonts have GASP entries suggesting that hinting be
  595.     disabled below 8 ppem, but FreeType ignores those, preferring to use
  596.     the data found in the instructed hints. The initial Vera release
  597.     didn't include the right instructions in the 'prep' table.
  598.  
  599.     Also good rule for Liberation Sans.
  600. -->
  601.     <match target="font">
  602.         <test name="family" qual="any">
  603.             <string>DejaVu Serif</string>
  604.             <string>Liberation Sans</string>
  605.         </test>
  606.         <test compare="less" name="pixelsize">
  607.             <double>7.5</double>
  608.         </test>
  609.         <edit mode="assign" name="hinting">
  610.             <bool>false</bool>
  611.         </edit>
  612.     </match>
  613.  
  614.  
  615.     <!-- Prevent middle stroke of e from being raised too high -->
  616.     <match target="font">
  617.         <test name="family" qual="any">
  618.             <string>Times New Roman PS</string>
  619.         </test>
  620.         <test compare="less" name="pixelsize">
  621.             <double>18</double>
  622.         </test>
  623.         <edit mode="assign" name="hinting">
  624.             <bool>false</bool>
  625.         </edit>
  626.         <edit name="lcdfilter" mode="assign">
  627.             <const>lcdnone</const>
  628.         </edit>
  629.     </match>
  630.  
  631.  
  632.     <!-- Tweak Lucida Sans normal, for http://www.billiardworld.com/talestip.htm -->
  633.     <match target="font">
  634.         <test compare="eq" name="family">
  635.             <string>Lucida Sans</string>
  636.         </test>
  637.         <test compare="less_eq" name="weight">
  638.             <const>medium</const>
  639.         </test>
  640.         <edit mode="assign" name="hintstyle">
  641.             <const>hintslight</const>
  642.         </edit>
  643.         <edit name="lcdfilter" mode="assign">
  644.             <const>lcdlight</const>
  645.         </edit>
  646.     </match>
  647.  
  648.  
  649.     <!-- Tweak PT Sans bold at:
  650.     http://www.theaustralian.com.au/news/opinion/one-mans-burden-to-rebuild-shattered-trust/story-e6frg6zo-1225887289935 - the G in BANGKOK -->
  651.     <match target="font">
  652.         <test compare="eq" name="family">
  653.             <string>PT Sans</string>
  654.         </test>
  655.         <test compare="more_eq" name="weight">
  656.             <const>medium</const>
  657.         </test>
  658.         <test compare="more_eq" name="pixelsize">
  659.             <double>14</double>
  660.         </test>
  661.         <edit mode="assign" name="hintstyle">
  662.             <const>hintfull</const>
  663.         </edit>
  664.     </match>
  665.  
  666.  
  667. <!--
  668.     "y" looks bad (top-left stroke is chopped in its middle),
  669.     when small-ish and italic, with hintmedium and hintfull.
  670.     E.g. http://www.google.com/search?hl=en&as_q=wine+setthreadpriority+patch&as_epq=1.1.41
  671.     Also, space between letters is too narrow, with hintmedium and hintfull:
  672.     http://www.zerohedge.com/article/greece-willwill-not-issue-6-debt-week-even-evans-pritchard-summarizes-it-best-greece-drownin
  673. -->
  674.     <match target="font">
  675.         <test name="slant" compare="more_eq">
  676.             <int>80</int>
  677.         </test>
  678.         <test compare="less_eq" name="pixelsize">
  679.             <double>16</double>
  680.         </test>
  681.         <test name="hintstyle" compare="more_eq">
  682.             <const>hintmedium</const>
  683.         </test>
  684.         <edit mode="assign" name="hintstyle">
  685.             <const>hintslight</const>
  686.         </edit>
  687.     </match>
  688.  
  689.     <!-- Override above rule for Arial italic - "y" still gets chopped at
  690.     http://planet.gentoo.org/universe/ - must set autohint on to fix that. -->
  691.     <match target="font">
  692.         <test compare="eq" name="family">
  693.             <string>Arial</string>
  694.         </test>
  695.         <test name="slant" compare="more_eq">
  696.             <int>80</int>
  697.         </test>
  698.         <test compare="less_eq" name="pixelsize">
  699.             <double>16</double>
  700.         </test>
  701.         <edit mode="assign" name="hintstyle">
  702.             <const>hintmedium</const>
  703.         </edit>
  704.         <edit name="lcdfilter" mode="assign">
  705.             <const>lcddefault</const>
  706.         </edit>
  707.         <edit mode="assign" name="autohint">
  708.             <bool>true</bool>
  709.         </edit>
  710.     </match>
  711.  
  712.  
  713.     <!-- Bold small fonts can look smudged - hintfull is best, surprisingly.
  714.     This is the general rule, for small bold fonts.
  715.     E.g. http://www.infoworld.com/d/adventures-in-it/it-personality-types-8-profiles-in-geekdom-313
  716.     demibold at http://bugs.archlinux.org/index/proj1 and
  717.     http://foo-projects.org/git/?p=lunar/moonbase.git;a=shortlog -->
  718.     <match target="font">
  719.         <test compare="less_eq" name="pixelsize">
  720.             <double>12</double>
  721.         </test>
  722.         <test name="weight" compare="more">
  723.             <const>medium</const>
  724.         </test>
  725.         <edit mode="assign" name="hintstyle">
  726.             <const>hintfull</const>
  727.         </edit>
  728.         <edit name="lcdfilter" mode="assign">
  729.             <const>lcdlegacy</const>
  730.         </edit>
  731.         <test name="weight" compare="more">
  732.             <const>demibold</const>
  733.         </test>
  734.         <edit name="lcdfilter" mode="assign">
  735.             <const>lcdlight</const>
  736.         </edit>
  737.     </match>
  738.  
  739.  
  740.     <!-- Tweak Lucida Sans bold, after the general rule, for http://www.billiardworld.com/talestip.htm -->
  741.     <!-- Tweak URW Palladio L, after the general rule, for http://blog.gmane.org/gmane.linux.alsa.user/month=20070901 -->
  742.     <match target="font">
  743.         <test name="family" qual="any">
  744.             <string>Lucida Sans</string>
  745.             <string>URW Palladio L</string>
  746.         </test>
  747.         <test compare="more" name="weight">
  748.             <const>medium</const>
  749.         </test>
  750.         <edit mode="assign" name="hintstyle">
  751.             <const>hintslight</const>
  752.         </edit>
  753.         <edit name="lcdfilter" mode="assign">
  754.             <const>lcddefault</const>
  755.         </edit>
  756.     </match>
  757.  
  758.  
  759.     <!-- Arial bold & small needs hinting disabled.
  760.     Worst example: http://www.digg.com/ -->
  761.     <match target="font">
  762.         <test compare="eq" name="family">
  763.             <string>Arial</string>
  764.         </test>
  765.         <test compare="less_eq" name="pixelsize">
  766.             <double>10</double>
  767.         </test>
  768.         <test name="weight" compare="more">
  769.             <const>normal</const>
  770.         </test>
  771.         <edit name="antialias" mode="assign">
  772.             <bool>false</bool>
  773.         </edit>
  774.         <edit name="rgba">
  775.             <const>none</const>
  776.         </edit>
  777.         <edit name="lcdfilter" mode="assign">
  778.             <const>lcdnone</const>
  779.         </edit>
  780.         <edit mode="assign" name="hintstyle">
  781.             <const>hintslight</const>
  782.         </edit>
  783.     </match>
  784.  
  785.  
  786.     <!-- Disable autohint for very bold fonts, to stop them looking too bold. -->
  787.     <match target="font">
  788.         <test name="weight" compare="more">
  789.             <const>demibold</const>
  790.         </test>
  791.         <edit name="autohint" mode="assign">
  792.             <bool>false</bool>
  793.         </edit>
  794.     </match>
  795.  
  796. </fontconfig>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement