summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2022-05-22 21:52:08 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2022-05-22 21:52:08 +0100
commit479cc6662a3a26a237a993290216f5257d031318 (patch)
tree1349105574854db8ffa86b2e003bf765255fb9dc /test
parente25cd523d0336286dcb43b17de3864399a55fd42 (diff)
downloadlibrufl-479cc6662a3a26a237a993290216f5257d031318.tar.gz
librufl-479cc6662a3a26a237a993290216f5257d031318.tar.bz2
Add a test for a broken encoding file
This file is broken in a number of ways: * It contains garbage content that does not form valid glyph name specifiers * It contains garbage directives * It tries to define more than 256 glyphs (which is not supported by non-UCS FontManagers) The latter point above uncovered a bug in the umap sanity checking where it failed to properly count the number of glyph indices being defined by the Encoding file.
Diffstat (limited to 'test')
-rw-r--r--test/data/oldfminit/Allerta (renamed from test/data/Encoding)0
-rw-r--r--test/data/oldfminit/INDEX2
-rw-r--r--test/data/oldfminit/brokenencoding.cfg28
3 files changed, 30 insertions, 0 deletions
diff --git a/test/data/Encoding b/test/data/oldfminit/Allerta
index e5b633e..e5b633e 100644
--- a/test/data/Encoding
+++ b/test/data/oldfminit/Allerta
diff --git a/test/data/oldfminit/INDEX b/test/data/oldfminit/INDEX
index 148ff51..c2d250f 100644
--- a/test/data/oldfminit/INDEX
+++ b/test/data/oldfminit/INDEX
@@ -6,3 +6,5 @@ latin1.cfg Simple Latin1 Encoding
mergeumap.cfg Merge identical umaps
nomapping.cfg Fonts with no mapping
symbol.cfg Simple symbol fonts
+
+brokenencoding.cfg Garbage encoding file
diff --git a/test/data/oldfminit/brokenencoding.cfg b/test/data/oldfminit/brokenencoding.cfg
new file mode 100644
index 0000000..b5e12c1
--- /dev/null
+++ b/test/data/oldfminit/brokenencoding.cfg
@@ -0,0 +1,28 @@
+# Configuration for broken encoding file
+
+%expumaps Corpus.Bold 0
+%expumaps Corpus.Bold.Oblique 0
+%expumaps Corpus.Medium 1
+%expumaps Corpus.Medium.Oblique 0
+%expumaps Homerton.Bold 0
+%expumaps Homerton.Bold.Oblique 0
+%expumaps Homerton.Medium 1
+%expumaps Homerton.Medium.Oblique 0
+%expumaps Trinity.Bold 0
+%expumaps Trinity.Bold.Italic 0
+%expumaps Trinity.Medium 1
+%expumaps Trinity.Medium.Italic 0
+
+# Font name Encoding name Filename
+Corpus.Bold Latin1 Allerta
+Corpus.Bold.Oblique Latin1 Allerta
+Corpus.Medium Latin1 Latin1
+Corpus.Medium.Oblique Latin1 Allerta
+Homerton.Bold Latin1 Allerta
+Homerton.Bold.Oblique Latin1 Allerta
+Homerton.Medium Latin1 Latin1
+Homerton.Medium.Oblique Latin1 Allerta
+Trinity.Bold Latin1 Allerta
+Trinity.Bold.Italic Latin1 Allerta
+Trinity.Medium Latin1 Latin1
+Trinity.Medium.Italic Latin1 Allerta