diff options
author | Dylam De La Torre <DyXel04@gmail.com> | 2021-11-23 05:21:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 04:21:56 +0000 |
commit | a51a54bc5979a2491f152abc47ad54e6b63f27c8 (patch) | |
tree | ce67092b2f6df366033a65a6111e4650866766b2 /res/fonts/conf.d/10-scale-bitmap-fonts.conf | |
parent | d88079000a79e6bcbe51c5a2868d57b303b5fcb6 (diff) | |
download | abaddon-portaudio-a51a54bc5979a2491f152abc47ad54e6b63f27c8.tar.gz abaddon-portaudio-a51a54bc5979a2491f152abc47ad54e6b63f27c8.zip |
Restructure source and resource files (#46)
importantly, res is now res/res and css is now res/css
Diffstat (limited to 'res/fonts/conf.d/10-scale-bitmap-fonts.conf')
-rw-r--r-- | res/fonts/conf.d/10-scale-bitmap-fonts.conf | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/res/fonts/conf.d/10-scale-bitmap-fonts.conf b/res/fonts/conf.d/10-scale-bitmap-fonts.conf new file mode 100644 index 0000000..b20b52e --- /dev/null +++ b/res/fonts/conf.d/10-scale-bitmap-fonts.conf @@ -0,0 +1,80 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + +<!-- + If font is bitmap, calculate scale factor. + Note that color bitmap fonts have scalable=true, while + non-color ones have scalable=false. Both groups have outline=false. + --> +<match target="font"> + <test name="outline" compare="eq"> + <bool>false</bool> + </test> + <edit name="pixelsizefixupfactor" mode="assign"> + <double>0.15</double> + </edit> +</match> +<!-- + For non-scalable bitmap fonts (ie. non-color), skip + minor scaling if hinting is enabled. + --> +<match target="font"> + <test name="outline" compare="eq"> + <bool>false</bool> + </test> + <test name="scalable" compare="eq"> + <bool>false</bool> + </test> + <test name="hinting" compare="eq"> + <bool>true</bool> + </test> + <edit name="scalingnotneeded" mode="assign"> + <and> + <less> + <name>pixelsizefixupfactor</name> + <double>1.2</double> + </less> + <more> + <name>pixelsizefixupfactor</name> + <double>0.8</double> + </more> + </and> + </edit> +</match> +<match target="font"> + <test name="scalingnotneeded" compare="eq"> + <bool>true</bool> + </test> + <edit name="pixelsizefixupfactor" mode="assign"> + <double>1.0</double> + </edit> +</match> +<!-- + If we *are* going to scale, go ahead and do it. + --> +<match target="font"> + <test name="outline" compare="eq"> + <bool>false</bool> + </test> + <test name="pixelsizefixupfactor" compare="not_eq"> + <double>1.0</double> + </test> + <edit name="matrix" mode="assign"> + <times> + <name>matrix</name> + <matrix> + <name>pixelsizefixupfactor</name> <double>0</double> + <double>0</double> <name>pixelsizefixupfactor</name> + </matrix> + </times> + </edit> + <edit name="size" mode="assign"> + <divide> + <name>size</name> + <name>pixelsizefixupfactor</name> + </divide> + </edit> +</match> + +</fontconfig> |