diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-11-26 20:26:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-11-27 00:30:43 +0100 |
| commit | 3d717831cb3b91064fc6d261fa0d94d548d9bd6a (patch) | |
| tree | dc642e3d58fed1e46a341fafba6af5a174f60357 | |
| parent | 447ee98f36b5ae2cd40b98e4316dc4428b374d90 (diff) | |
Add the same fonts.conf change that OS X has to Windows so that it,
too, can do fake bold/italic (slanted/oblique). It looks like this
is necessary to see italics with the bundled fonts.
| -rw-r--r-- | fonts/fonts.conf.windows | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/fonts/fonts.conf.windows b/fonts/fonts.conf.windows index 2b1c0ae4d..a3820b427 100644 --- a/fonts/fonts.conf.windows +++ b/fonts/fonts.conf.windows @@ -1,5 +1,67 @@ <fontconfig> <dir>C:\windows\fonts</dir> <cachedir>~/AppData/Local/Temp/fontconfig</cachedir> + +<!-- + Artificial oblique for fonts without an italic or oblique version + --> + + <match target="font"> + <!-- check to see if the font is roman --> + <test name="slant"> + <const>roman</const> + </test> + <!-- check to see if the pattern requested non-roman --> + <test target="pattern" name="slant" compare="not_eq"> + <const>roman</const> + </test> + <!-- multiply the matrix to slant the font --> + <edit name="matrix" mode="assign"> + <times> + <name>matrix</name> + <matrix><double>1</double><double>0.2</double> + <double>0</double><double>1</double> + </matrix> + </times> + </edit> + <!-- pretend the font is oblique now --> + <edit name="slant" mode="assign"> + <const>oblique</const> + </edit> + <!-- and disable embedded bitmaps for artificial oblique --> + <edit name="embeddedbitmap" mode="assign"> + <bool>false</bool> + </edit> + </match> + +<!-- + Synthetic emboldening for fonts that do not have bold face available + --> + + <match target="font"> + <!-- check to see if the font is just regular --> + <test name="weight" compare="less_eq"> + <const>medium</const> + </test> + <!-- check to see if the pattern requests bold --> + <test target="pattern" name="weight" compare="more"> + <const>medium</const> + </test> + <!-- + set the embolden flag + needed for applications using cairo, e.g. gucharmap, gedit, ... + --> + <edit name="embolden" mode="assign"> + <bool>true</bool> + </edit> + <!-- + set weight to bold + needed for applications using Xft directly, e.g. Firefox, ... + --> + <edit name="weight" mode="assign"> + <const>bold</const> + </edit> + </match> + </fontconfig> |
