--- /dev/null
+#! /bin/bash
+
+# Check that the X server can find all of the Bedstead fonts that
+# should be installed. This doesn't check the precise output of
+# xlsfonts just in case there are extra fonts that match.
+
+set -euo pipefail
+
+cd -- "${AUTOPKGTEST_TMP}"
+
+sort >expected <<EOF
+-bjh21-bedstead-bold-r-normal--0-0-75-75-c-0-iso10646-1
+-bjh21-bedstead-bold-r-normal--193-20-75-75-c-120-iso10646-1
+-bjh21-bedstead-medium-r-normal--0-0-75-75-c-0-iso10646-1
+-bjh21-bedstead-medium-r-normal--193-20-75-75-c-120-iso10646-1
+-bjh21-bedstead-medium-r-normal--96-10-75-75-c-60-iso10646-1
+EOF
+
+xvfb-run -a xlsfonts -fn '-bjh21-bedstead-*' | sort >actual
+
+echo "xlsfonts output:"
+cat actual
+
+comm -13 actual expected >missing
+
+if [ -s missing ]; then
+ echo "Missing from xlsfonts output:"
+ cat missing
+ exit 1
+fi
+
+# Check that each alias maps to precisely one font.
+for a in bedstead-10 bedstead-20 bedstead-bold-20; do
+ count="$(xlsfonts "$a" | wc -l)"
+ if [ "$count" -eq 1 ]; then
+ echo "xlsfonts $a correctly returned one result"
+ else
+ echo "xlsfonts $a returned $count results, not 1" >&2
+ exit 1
+ fi
+done