88-forced-synthetic.conf 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version='1.0'?>
  2. <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
  3. <fontconfig>
  4. <!-- ## Forced artificial italic / bold ## -->
  5. <!-- "Unforced" artificial/italic already included in /etc/fonts/conf.d/
  6. rules. -->
  7. <!-- Artificial oblique for fonts without an italic or oblique version. -->
  8. <match target="font">
  9. <!-- check to see if the font is roman -->
  10. <test name="slant">
  11. <const>roman</const>
  12. </test>
  13. <!-- check to see if the pattern requested non-roman -->
  14. <test target="pattern" name="slant" compare="not_eq">
  15. <const>roman</const>
  16. </test>
  17. <!-- multiply the matrix to slant the font -->
  18. <edit name="matrix" mode="assign">
  19. <times>
  20. <name>matrix</name>
  21. <matrix>
  22. <double>1</double>
  23. <double>0.2</double>
  24. <double>0</double>
  25. <double>1</double>
  26. </matrix>
  27. </times>
  28. </edit>
  29. <!-- pretend the font is oblique now -->
  30. <edit name="slant" mode="assign">
  31. <const>oblique</const>
  32. </edit>
  33. <!-- and disable embedded bitmaps for artificial oblique -->
  34. <edit name="embeddedbitmap" mode="assign">
  35. <bool>false</bool>
  36. </edit>
  37. </match>
  38. <!-- Synthetic emboldening for fonts that do not have bold face available. -->
  39. <match target="font">
  40. <!-- check to see if the font is just regular -->
  41. <test name="weight" compare="less_eq">
  42. <const>medium</const>
  43. </test>
  44. <!-- check to see if the pattern requests bold -->
  45. <test target="pattern" name="weight" compare="more">
  46. <const>medium</const>
  47. </test>
  48. <!-- set the embolden flag
  49. needed for applications using cairo, e.g. gucharmap, gedit, ... -->
  50. <edit name="embolden" mode="assign">
  51. <bool>true</bool>
  52. </edit>
  53. <!-- set weight to bold
  54. needed for applications using Xft directly, e.g. Firefox, ... -->
  55. <edit name="weight" mode="assign">
  56. <const>bold</const>
  57. </edit>
  58. </match>
  59. </fontconfig>