Advertisement
Guest User

fonts.conf

a guest
Aug 27th, 2024
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MXML 12.70 KB | Gaming | 0 0
  1. <?xml version='1.0'?>
  2. <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
  3. <fontconfig>
  4.  
  5.     <!-- Choose an OS Rendering Style.  This will determine B/W, grayscale,
  6.          or subpixel antialising and slight, full or no hinting and replacements (if set in next option) -->
  7.     <!-- Style should also be set in the infinality-settings.sh file, ususally in /etc/profile.d/ -->
  8.  
  9.     <!-- Choose one of these options:
  10.         Infinality      - subpixel AA, minimal replacements/tweaks, sans=Arial
  11.         Windows 7       - subpixel AA, sans=Arial
  12.         Windows XP      - subpixel AA, sans=Arial
  13.         Windows 98      - B/W full hinting on TT fonts, grayscale AA for others, sans=Arial
  14.         OSX             - Slight hinting, subpixel AA, sans=Helvetica Neue
  15.         OSX2            - No hinting, subpixel AA, sans=Helvetica Neue
  16.         Linux           - subpixel AA, sans=DejaVu Sans
  17.     === Recommended Setup ===
  18.     Run ./infctl.sh script located in the current directory to set the style.
  19.     # ./infctl.sh setstyle
  20.     === Manual Setup ===
  21.     See the infinality/styles.conf.avail/ directory for all options.  To enable
  22.     a different style, remove the symlink "conf.d" and link to another style:
  23.     # rm conf.d
  24.     # ln -s styles.conf.avail/win7 conf.d
  25.     -->
  26.  
  27.     <dir prefix="default">../../csgo/panorama/fonts</dir>
  28.     <dir>WINDOWSFONTDIR</dir>
  29.     <dir>~/.fonts</dir>
  30.     <dir>/usr/share/fonts</dir>
  31.     <dir>/usr/local/share/fonts</dir>
  32.     <dir prefix="xdg">fonts</dir>
  33.  
  34.     <!-- A fontpattern is a font file name, not a font name.  Be aware of filenames across all platforms! -->
  35.     <fontpattern>Arial</fontpattern>
  36.     <fontpattern>.uifont</fontpattern>
  37.     <fontpattern>notosans</fontpattern>
  38.     <fontpattern>notoserif</fontpattern>
  39.     <fontpattern>notomono-regular</fontpattern>
  40.  
  41.     <cachedir>WINDOWSTEMPDIR_FONTCONFIG_CACHE</cachedir>
  42.     <cachedir>~/.fontconfig</cachedir>
  43.  
  44.     <!-- Uncomment this to reject all bitmap fonts -->
  45.     <!-- Make sure to run this as root if having problems:  fc-cache -f -->
  46.  
  47.     <selectfont>
  48.         <rejectfont>
  49.             <pattern>
  50.                 <patelt name="scalable" >
  51.                     <bool>false</bool>
  52.                 </patelt>
  53.             </pattern>
  54.         </rejectfont>
  55.     </selectfont>
  56.  
  57.  
  58.     <!-- THESE RULES RELATE TO THE OLD MONODIGIT FONTS, TO BE REMOVED ONCE ALL REFERENCES TO THEM HAVE GONE. -->
  59.     <!-- The Stratum2 Monodigit fonts just supply the monospaced digits -->
  60.     <!-- All other characters should come from ordinary Stratum2 -->
  61.     <match>
  62.         <test name="family">
  63.             <string>Stratum2 Bold Monodigit</string>
  64.         </test>
  65.         <edit name="family" mode="append" binding="strong">
  66.             <string>Stratum2</string>
  67.         </edit>
  68.         <edit name="style" mode="assign" binding="strong">
  69.             <string>Bold</string>
  70.         </edit>
  71.     </match>
  72.  
  73.     <match>
  74.         <test name="family">
  75.             <string>Stratum2 Regular Monodigit</string>
  76.         </test>
  77.         <edit name="family" mode="append" binding="strong">
  78.             <string>Stratum2</string>
  79.         </edit>
  80.         <edit name="weight" mode="assign" binding="strong">
  81.             <string>Regular</string>
  82.         </edit>
  83.     </match>
  84.  
  85.     <!-- Stratum2 only contains a subset of the Vietnamese alphabet. -->
  86.     <!-- So when language is set to Vietnamese, replace Stratum with Noto. -->
  87.     <!-- Exceptions are Mono and TF fonts. -->
  88.     <!-- Ensure we pick an Italic/Bold version of Noto where appropriate. -->
  89.     <!-- Adjust size due to the Ascent value for Noto being significantly larger than Stratum. -->
  90.     <!-- Adjust size even smaller for condensed fonts.-->
  91.     <match>
  92.         <test name="lang">
  93.             <string>vi-vn</string>
  94.         </test>
  95.         <test name="family" compare="contains">
  96.             <string>Stratum2</string>
  97.         </test>
  98.         <test qual="all" name="family" compare="not_contains">
  99.             <string>TF</string>
  100.         </test>
  101.         <test qual="all" name="family" compare="not_contains">
  102.             <string>Mono</string>
  103.         </test>
  104.         <test qual="all" name="family" compare="not_contains">
  105.             <string>ForceStratum2</string>
  106.         </test>
  107.         <edit name="weight" mode="assign">
  108.             <if>
  109.                 <contains>
  110.                     <name>family</name>
  111.                     <string>Stratum2 Black</string>
  112.                 </contains>
  113.                 <int>210</int>
  114.                 <name>weight</name>
  115.             </if>
  116.         </edit>
  117.         <edit name="slant" mode="assign">
  118.             <if>
  119.                 <contains>
  120.                     <name>family</name>
  121.                     <string>Italic</string>
  122.                 </contains>
  123.                 <int>100</int>
  124.                 <name>slant</name>
  125.             </if>
  126.         </edit>
  127.         <edit name="pixelsize" mode="assign">
  128.             <if>
  129.                 <or>
  130.                     <contains>
  131.                         <name>family</name>
  132.                         <string>Condensed</string>
  133.                     </contains>
  134.                     <less_eq>
  135.                         <name>width</name>
  136.                         <int>75</int>
  137.                     </less_eq>
  138.                 </or>
  139.                 <times>
  140.                     <name>pixelsize</name>
  141.                     <double>0.7</double>
  142.                 </times>
  143.                 <times>
  144.                     <name>pixelsize</name>
  145.                     <double>0.9</double>
  146.                 </times>
  147.             </if>
  148.         </edit>
  149.         <edit name="family" mode="assign" binding="same">
  150.             <string>notosans</string>
  151.         </edit>
  152.     </match>
  153.  
  154.     <!-- More Vietnamese... -->
  155.     <!-- In some cases (hud health, ammo, money) we want to force Stratum to be used. -->
  156.     <match>
  157.         <test name="lang">
  158.             <string>vi-vn</string>
  159.         </test>
  160.         <test name="family">
  161.             <string>ForceStratum2</string>
  162.         </test>
  163.         <edit name="family" mode="assign" binding="same">
  164.             <string>Stratum2</string>
  165.         </edit>
  166.     </match>
  167.  
  168.     <!-- For Japanese prefer Noto Sans JP to Noto Sans SC. -->
  169.     <match>
  170.         <test name="lang">
  171.             <string>ja-jp</string>
  172.         </test>
  173.         <test name="family" compare="contains">
  174.             <string>notosans</string>
  175.         </test>
  176.         <edit name="family" mode="prepend" binding="same">
  177.             <string>notosansJP</string>
  178.         </edit>
  179.     </match>
  180.  
  181.     <!-- For Japanese default to Noto Sans JP instead of Noto Sans SC when Stratum2 is requested. -->
  182.     <match>
  183.         <test name="lang">
  184.             <string>ja-jp</string>
  185.         </test>
  186.         <test name="family" compare="contains">
  187.             <string>Stratum2</string>
  188.         </test>
  189.         <edit name="family" mode="append_last" binding="same">
  190.             <string>notosansJP</string>
  191.         </edit>
  192.     </match>
  193.  
  194.     <!-- Fallback font sizes. -->
  195.     <!-- If we request Stratum, but end up with Arial, reduce the pixelsize because Arial glyphs are larger than Stratum. -->
  196.     <match target="font">
  197.         <test name="family" target="pattern" compare="contains">
  198.             <string>Stratum2</string>
  199.         </test>
  200.         <test name="family" target="font" compare="contains">
  201.             <string>Arial</string>
  202.         </test>
  203.         <edit name="pixelsize" mode="assign">
  204.             <times>
  205.                 <name>pixelsize</name>
  206.                 <double>0.9</double>
  207.             </times>
  208.         </edit>
  209.     </match>
  210.  
  211.     <!-- If we request Stratum, but end up with Noto, reduce the pixelsize. -->
  212.     <!-- This fixes alignment issues due to the Ascent value for Noto being significantly larger than Stratum. -->
  213.     <match target="font">
  214.         <test name="family" target="pattern" compare="contains">
  215.             <string>Stratum2</string>
  216.         </test>
  217.         <test name="family" target="font" compare="contains">
  218.             <string>Noto</string>
  219.         </test>
  220.         <edit name="pixelsize" mode="assign">
  221.             <times>
  222.                 <name>pixelsize</name>
  223.                 <double>0.9</double>
  224.             </times>
  225.         </edit>
  226.     </match>
  227.  
  228.     <!-- Stratum contains a set of arrow symbols in place of certain greek/mathematical characters - presumably for some historical reason, possibly used by VGUI somewhere?. -->
  229.     <!-- For panorama these Stratum characters should be ignored and picked up from a fallback font instead. -->
  230.     <!-- The latest versions of some of the Stratum fonts have been updated to include greek characaters, so for these we only need to exclude the problem mathematical characters. -->
  231.     <match target="scan">
  232.         <test name="family">
  233.             <string>Stratum2</string> <!-- This matches all the source2 Stratum fonts except the mono versions -->
  234.         </test>
  235.         <edit name="charset" mode="assign">
  236.             <if>                                    <!-- if font name contains "TF", -->
  237.                 <or>
  238.                     <contains>
  239.                         <name>fullname</name>
  240.                         <string>TF</string>
  241.                     </contains>
  242.                     <eq>                            <!-- or is italic, -->
  243.                         <name>slant</name>
  244.                         <int>100</int>
  245.                     </eq>
  246.                 </or>
  247.                 <minus>                             <!-- then exclude all problem greek and mathematical characters, -->
  248.                     <name>charset</name>
  249.                     <charset>
  250.                         <int>0x0394</int> <!-- greek delta -->
  251.                         <int>0x03A9</int> <!-- greek omega -->
  252.                         <int>0x03BC</int> <!-- greek mu -->
  253.                         <int>0x03C0</int> <!-- greek pi -->
  254.                         <int>0x2202</int> <!-- partial diff -->
  255.                         <int>0x2206</int> <!-- delta -->
  256.                         <int>0x220F</int> <!-- product -->
  257.                         <int>0x2211</int> <!-- sum -->
  258.                         <int>0x221A</int> <!-- square root -->
  259.                         <int>0x221E</int> <!-- infinity -->
  260.                         <int>0x222B</int> <!-- integral -->
  261.                         <int>0x2248</int> <!-- approxequal -->
  262.                         <int>0x2260</int> <!-- notequal -->
  263.                         <int>0x2264</int> <!-- lessequal -->
  264.                         <int>0x2265</int> <!-- greaterequal -->
  265.                         <int>0x25CA</int> <!-- lozenge -->
  266.                     </charset>
  267.                 </minus>
  268.                 <minus>                             <!-- otherwise only exclude the problem mathematical characters. -->
  269.                     <name>charset</name>
  270.                     <charset>
  271.                         <int>0x2202</int> <!-- partial diff -->
  272.                         <int>0x2206</int> <!-- delta -->
  273.                         <int>0x220F</int> <!-- product -->
  274.                         <int>0x2211</int> <!-- sum -->
  275.                         <int>0x221A</int> <!-- square root -->
  276.                         <int>0x221E</int> <!-- infinity -->
  277.                         <int>0x222B</int> <!-- integral -->
  278.                         <int>0x2248</int> <!-- approxequal -->
  279.                         <int>0x2260</int> <!-- notequal -->
  280.                         <int>0x2264</int> <!-- lessequal -->
  281.                         <int>0x2265</int> <!-- greaterequal -->
  282.                         <int>0x25CA</int> <!-- lozenge -->
  283.                     </charset>
  284.                 </minus>
  285.             </if>
  286.         </edit>
  287.     </match>
  288.  
  289.     <!-- Ban Type-1 fonts because they render poorly -->
  290.     <!-- Comment this out to allow all Type 1 fonts -->
  291.     <selectfont>
  292.         <rejectfont>
  293.             <pattern>
  294.                 <patelt name="fontformat" >
  295.                     <string>Type 1</string>
  296.                 </patelt>
  297.             </pattern>
  298.         </rejectfont>
  299.     </selectfont>
  300.  
  301.     <!-- Globally use embedded bitmaps in fonts like Calibri? -->
  302.     <match target="font" >
  303.         <edit name="embeddedbitmap" mode="assign">
  304.             <bool>false</bool>
  305.         </edit>
  306.     </match>
  307.  
  308.     <!-- Substitute truetype fonts in place of bitmap ones? -->
  309.     <match target="pattern" >
  310.         <edit name="prefer_outline" mode="assign">
  311.             <bool>true</bool>
  312.         </edit>
  313.     </match>
  314.  
  315.     <!-- Do font substitutions for the set style? -->
  316.     <!-- NOTE: Custom substitutions in 42-repl-global.conf will still be done -->
  317.     <!-- NOTE: Corrective substitutions will still be done -->
  318.     <match target="pattern" >
  319.         <edit name="do_substitutions" mode="assign">
  320.             <bool>true</bool>
  321.         </edit>
  322.     </match>
  323.  
  324.     <!-- Make (some) monospace/coding TTF fonts render as bitmaps? -->
  325.     <!-- courier new, andale mono, monaco, etc. -->
  326.     <match target="pattern" >
  327.         <edit name="bitmap_monospace" mode="assign">
  328.             <bool>false</bool>
  329.         </edit>
  330.     </match>
  331.  
  332.     <!-- Force autohint always -->
  333.     <!-- Useful for debugging and for free software purists -->
  334.     <match target="font">
  335.         <edit name="force_autohint" mode="assign">
  336.             <bool>false</bool>
  337.         </edit>
  338.     </match>
  339.  
  340.     <!-- Set DPI.  dpi should be set in ~/.Xresources to 96 -->
  341.     <!-- Setting to 72 here makes the px to pt conversions work better (Chrome) -->
  342.     <!-- Some may need to set this to 96 though -->
  343.     <match target="pattern">
  344.         <edit name="dpi" mode="assign">
  345.             <double>96</double>
  346.         </edit>
  347.     </match>
  348.  
  349.     <!-- Use Qt subpixel positioning on autohinted fonts? -->
  350.     <!-- This only applies to Qt and autohinted fonts. Qt determines subpixel positioning based on hintslight vs. hintfull, -->
  351.     <!--   however infinality patches force slight hinting inside freetype, so this essentially just fakes out Qt. -->
  352.     <!-- Should only be set to true if you are not doing any stem alignment or fitting in environment variables -->
  353.     <match target="pattern" >
  354.         <edit name="qt_use_subpixel_positioning" mode="assign">
  355.             <bool>false</bool>
  356.         </edit>
  357.     </match>
  358.  
  359.     <!-- Run infctl.sh or change the symlink in current directory instead of modifying this -->
  360.     <include>../../../core/panorama/fonts/conf.d</include>
  361.  
  362.     <!-- AveYo: scale console font -->
  363.     <match target="font">
  364.         <test name="family" target="pattern" compare="contains">
  365.             <string>Stratum2 Mono</string>
  366.         </test>
  367.         <test name="family" target="pattern" compare="contains">
  368.             <string>Arial Unicode MS</string>
  369.         </test>
  370.         <test name="weight" compare="eq">
  371.             <int>80</int>
  372.         </test>
  373.         <test name="size" compare="more">
  374.             <double>9</double><!-- AveYo: you might need to adjust the min size filter here depending on dpi -->
  375.         </test>
  376.         <test name="size" compare="less">
  377.             <double>10</double><!-- AveYo: you might need to adjust the max size filter here depending on dpi -->
  378.         </test>
  379.         <edit name="pixelsize" mode="assign">
  380.             <times>
  381.                 <name>pixelsize</name>
  382.                 <double>1.25</double>
  383.             </times>
  384.         </edit>
  385.     </match>
  386.  
  387.     <!-- AveYo: uncomment this to scale all fonts -->
  388.     <!--
  389.     <match target="font">
  390.         <test name="family" target="pattern" compare="not_contains">
  391.             <string>Potato-Res</string>
  392.         </test>
  393.         <edit name="pixelsize" mode="assign">
  394.             <times>
  395.                 <name>pixelsize</name>
  396.                 <double>1.25</double>
  397.             </times>
  398.         </edit>
  399.     </match>
  400.     -->
  401.  
  402. </fontconfig>
  403.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement