summaryrefslogtreecommitdiff
path: root/tests/nofonts
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-09-26 20:41:19 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-09-26 20:46:00 -0400
commite27ac590d44e87adac235c1b63429dc5f832f782 (patch)
tree4d473b24ef7c97d57ff89f9751c58baf30ff6696 /tests/nofonts
parentf47e506bb0f692a4e2c6e498f2433cf781acb4eb (diff)
downloadpango-e27ac590d44e87adac235c1b63429dc5f832f782.tar.gz
Add a test for no-fontsno-font-fixes
Test that the layout is made up entirely of unknown glyphs if we have no font. The main point of this test is to ensure that we don't crash if analysis->font is NULL.
Diffstat (limited to 'tests/nofonts')
-rw-r--r--tests/nofonts/fonts.conf71
1 files changed, 71 insertions, 0 deletions
diff --git a/tests/nofonts/fonts.conf b/tests/nofonts/fonts.conf
new file mode 100644
index 00000000..15685421
--- /dev/null
+++ b/tests/nofonts/fonts.conf
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
+<fontconfig>
+ <cachedir>/tmp/cache</cachedir>
+
+ <match target="font">
+ <test name="outline" compare="eq">
+ <bool>false</bool>
+ </test>
+ <edit name="pixelsizefixupfactor" mode="assign">
+ <divide>
+ <name target="pattern">pixelsize</name>
+ <name target="font">pixelsize</name>
+ </divide>
+ </edit>
+ </match>
+
+ <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>
+
+ <alias binding="same">
+ <family>Noto Color Emoji</family>
+ <default><family>emoji</family></default>
+ </alias>
+
+ <match>
+ <test name="lang">
+ <string>und-zsye</string>
+ </test>
+ <test qual="all" name="family" compare="not_eq">
+ <string>emoji</string>
+ </test>
+ <edit name="family" mode="append" binding="strong">
+ <string>emoji</string>
+ </edit>
+ </match>
+
+ <alias binding="same">
+ <family>emoji</family>
+ <prefer>
+ <family>Noto Color Emoji</family>
+ </prefer>
+ </alias>
+
+ <alias>
+ <family>monospace</family>
+ <prefer><family>DejaVu Sans Mono</family></prefer>
+ </alias>
+
+</fontconfig>