Add missing <dir> entries to the macOS fonts.conf
[dcpomatic.git] / fonts / fonts.conf.osx
1 <?xml version="1.0"?>
2 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3 <fontconfig>
4 <dir>/System/Library/Fonts</dir>
5 <dir>/Library/Fonts</dir>
6 <dir>~/Library/Fonts</dir>
7
8 <cachedir>~/.fontconfig</cachedir>
9 <cachedir prefix="xdg">fontconfig</cachedir>
10
11 <!-- 
12  Artificial oblique for fonts without an italic or oblique version
13  -->
14  
15         <match target="font">
16                 <!-- check to see if the font is roman -->
17                 <test name="slant">
18                         <const>roman</const>
19                 </test>
20                 <!-- check to see if the pattern requested non-roman -->
21                 <test target="pattern" name="slant" compare="not_eq">
22                         <const>roman</const>
23                 </test>
24                 <!-- multiply the matrix to slant the font -->
25                 <edit name="matrix" mode="assign">
26                         <times>
27                                 <name>matrix</name>
28                                 <matrix><double>1</double><double>0.2</double>
29                                         <double>0</double><double>1</double>
30                                 </matrix>
31                         </times>
32                 </edit>
33                 <!-- pretend the font is oblique now -->
34                 <edit name="slant" mode="assign">
35                         <const>oblique</const>
36                 </edit>
37                 <!-- and disable embedded bitmaps for artificial oblique -->
38                 <edit name="embeddedbitmap" mode="assign">
39                         <bool>false</bool>
40                 </edit>
41         </match>
42
43 <!--
44  Synthetic emboldening for fonts that do not have bold face available
45  -->
46
47         <match target="font">
48                 <!-- check to see if the font is just regular -->
49                 <test name="weight" compare="less_eq">
50                         <const>medium</const>
51                 </test>
52                 <!-- check to see if the pattern requests bold -->
53                 <test target="pattern" name="weight" compare="more">
54                         <const>medium</const>
55                 </test>
56                 <!--
57                   set the embolden flag
58                   needed for applications using cairo, e.g. gucharmap, gedit, ...
59                 -->
60                 <edit name="embolden" mode="assign">
61                         <bool>true</bool>
62                 </edit>
63                 <!--
64                  set weight to bold
65                  needed for applications using Xft directly, e.g. Firefox, ...
66                 -->
67                 <edit name="weight" mode="assign">
68                         <const>bold</const>
69                 </edit>
70         </match>
71 </fontconfig>