summaryrefslogtreecommitdiff
path: root/Build/source/texk/ttfdump
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-02-24 12:23:16 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-02-24 12:23:16 +0000
commit0ddb97906a4aca3d70e051d8491cbfc0c82bca67 (patch)
treebb19141488cf439a202d19f0ec0febeb4446a1e3 /Build/source/texk/ttfdump
parentb687311a6d56cbb57cac644ea7a269722fb39e90 (diff)
texk/ttfdump: Add a TrueType Collection test
git-svn-id: svn://tug.org/texlive/trunk@36367 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ttfdump')
-rw-r--r--Build/source/texk/ttfdump/ChangeLog9
-rw-r--r--Build/source/texk/ttfdump/Makefile.am13
-rw-r--r--Build/source/texk/ttfdump/Makefile.in10
-rw-r--r--Build/source/texk/ttfdump/tests/test.ttcbin0 -> 45876 bytes
-rw-r--r--Build/source/texk/ttfdump/tests/ttfdump.gasp39
-rw-r--r--Build/source/texk/ttfdump/tests/ttfdump.maxp47
-rwxr-xr-xBuild/source/texk/ttfdump/tests/ttfdump.test54
7 files changed, 142 insertions, 30 deletions
diff --git a/Build/source/texk/ttfdump/ChangeLog b/Build/source/texk/ttfdump/ChangeLog
index ec43c77c70d..6997a11bd3d 100644
--- a/Build/source/texk/ttfdump/ChangeLog
+++ b/Build/source/texk/ttfdump/ChangeLog
@@ -1,3 +1,10 @@
+2015-02-24 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tests/ttfdump.test: Add a TrueType Collection test.
+ * tests/test.ttc (new): Additional test input.
+ * tests/ttfdump.gasp, tests/ttfdump.maxp (new): Expected output.
+ * Makefile.am: Adapted.
+
2014-12-10 Peter Breitenlohner <peb@mppmu.mpg.de>
* libttf/pclt.c: Repalce "%02hx" => "%02x" for unsigned char.
@@ -27,7 +34,7 @@
* libttf/os2.c: Index checking for string array elements.
* tests/ttfdump.test: Add a test case for invalid array indices.
* tests/bad.otf (new): Additional test input.
- * tests/ttfdump.bad (new): Expected output..
+ * tests/ttfdump.bad (new): Expected output.
* Makefile.am: Adapted.
2013-01-31 Akihiro Sagawa <sagawa.aki@gmail.com>
diff --git a/Build/source/texk/ttfdump/Makefile.am b/Build/source/texk/ttfdump/Makefile.am
index 21750d8e35e..6376f7e414d 100644
--- a/Build/source/texk/ttfdump/Makefile.am
+++ b/Build/source/texk/ttfdump/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am for the TeX Live subdirectory texk/ttfdump/
##
-## Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
AM_CPPFLAGS = -I$(top_srcdir)/include $(KPATHSEA_INCLUDES) -DUNIX -DKPATHSEA
@@ -91,18 +91,17 @@ DISTCLEANFILES =
EXTRA_DIST += \
tests/FonetikaDaniaIwonaeRegular.ttf \
tests/bad.otf \
+ tests/test.ttc \
tests/texmfhome.otf \
tests/ttfdump.bad \
+ tests/ttfdump.gasp \
tests/ttfdump.glyf \
tests/ttfdump.gpos \
tests/ttfdump.gsub \
tests/ttfdump.head \
- tests/ttfdump.os_2
-DISTCLEANFILES += \
- FonetikaDaniaIwonaeRegular.ttf \
- texmfhome.otf \
- bad.otf \
- ttftest.*
+ tests/ttfdump.os_2 \
+ tests/ttfdump.maxp
+DISTCLEANFILES += ttftest.*
## Not used
##
diff --git a/Build/source/texk/ttfdump/Makefile.in b/Build/source/texk/ttfdump/Makefile.in
index 8be024783c5..c153ddb5faa 100644
--- a/Build/source/texk/ttfdump/Makefile.in
+++ b/Build/source/texk/ttfdump/Makefile.in
@@ -619,15 +619,15 @@ libttf_a_SOURCES = \
EXTRA_DIST = include/stack.h libttf/fixed.c libttf/interp.c \
libttf/stack.c docs/ttfdump.dvi docs/ttfdump.html \
docs/ttfdump.ps $(TESTS) tests/FonetikaDaniaIwonaeRegular.ttf \
- tests/bad.otf tests/texmfhome.otf tests/ttfdump.bad \
- tests/ttfdump.glyf tests/ttfdump.gpos tests/ttfdump.gsub \
- tests/ttfdump.head tests/ttfdump.os_2 ILX NOTE README.bg5
+ tests/bad.otf tests/test.ttc tests/texmfhome.otf \
+ tests/ttfdump.bad tests/ttfdump.gasp tests/ttfdump.glyf \
+ tests/ttfdump.gpos tests/ttfdump.gsub tests/ttfdump.head \
+ tests/ttfdump.os_2 tests/ttfdump.maxp ILX NOTE README.bg5
ttfdump_SOURCES = src/ttfdump.c
LDADD = libttf.a $(KPATHSEA_LIBS)
dist_man1_MANS = docs/ttfdump.1
TESTS = tests/ttfdump.test
-DISTCLEANFILES = FonetikaDaniaIwonaeRegular.ttf texmfhome.otf bad.otf \
- ttftest.*
+DISTCLEANFILES = ttftest.*
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/Build/source/texk/ttfdump/tests/test.ttc b/Build/source/texk/ttfdump/tests/test.ttc
new file mode 100644
index 00000000000..2eea577e9c1
--- /dev/null
+++ b/Build/source/texk/ttfdump/tests/test.ttc
Binary files differ
diff --git a/Build/source/texk/ttfdump/tests/ttfdump.gasp b/Build/source/texk/ttfdump/tests/ttfdump.gasp
new file mode 100644
index 00000000000..50b64fcc171
--- /dev/null
+++ b/Build/source/texk/ttfdump/tests/ttfdump.gasp
@@ -0,0 +1,39 @@
+True Type Font File Dumper: v 0.5.5
+Copyright 1996-1998 ollie@ms1.hinet.net
+Dumping File:(null)
+
+
+TrueType Collection Header
+--------------------------
+TTC version: 2.0
+Number of fonts: 2
+Offset of Directory #0: 36
+Offset of Directory #1: 812
+
+Offset Table
+------------
+ sfnt version: 1.0
+ number of tables: 12
+ 0. 'FFTM' - checksum = 0x093b157f, offset = 0x00000698, len = 28
+ 1. 'OS/2' - checksum = 0x53571407, offset = 0x000006b4, len = 86
+ 2. 'cmap' - checksum = 0x69bcecb8, offset = 0x0000070c, len = 770
+ 3. 'gasp' - checksum = 0xffff0003, offset = 0x00000a10, len = 8
+ 4. 'glyf' - checksum = 0xe737e2ca, offset = 0x000020dc, len = 37464
+ 5. 'head' - checksum = 0x057baae0, offset = 0x00000a18, len = 54
+ 6. 'hhea' - checksum = 0x030a03d4, offset = 0x00000634, len = 36
+ 7. 'hmtx' - checksum = 0x472950a3, offset = 0x00001aa4, len = 1058
+ 8. 'loca' - checksum = 0x867eab72, offset = 0x00001ec8, len = 532
+ 9. 'maxp' - checksum = 0x014f009f, offset = 0x00000658, len = 32
+ 10. 'name' - checksum = 0x8e84692b, offset = 0x00000a50, len = 762
+ 11. 'post' - checksum = 0xc0c5b5cd, offset = 0x00000d4c, len = 752
+
+'gasp' Table - Grid-fitting And Scan-conversion Procedure
+---------------------------------------------------------
+'gasp' version: 0
+numRanges: 1
+
+ gasp Range 0
+ rangeMaxPPEM: 65535
+ rangeGaspBehavior: 0x0002
+
+
diff --git a/Build/source/texk/ttfdump/tests/ttfdump.maxp b/Build/source/texk/ttfdump/tests/ttfdump.maxp
new file mode 100644
index 00000000000..009784e55df
--- /dev/null
+++ b/Build/source/texk/ttfdump/tests/ttfdump.maxp
@@ -0,0 +1,47 @@
+True Type Font File Dumper: v 0.5.5
+Copyright 1996-1998 ollie@ms1.hinet.net
+Dumping File:(null)
+
+
+TrueType Collection Header
+--------------------------
+TTC version: 2.0
+Number of fonts: 2
+Offset of Directory #0: 36
+Offset of Directory #1: 812
+
+Offset Table
+------------
+ sfnt version: 1.0
+ number of tables: 12
+ 0. 'FFTM' - checksum = 0x093b157f, offset = 0x00000698, len = 28
+ 1. 'OS/2' - checksum = 0x5356145c, offset = 0x0000103c, len = 86
+ 2. 'cmap' - checksum = 0xfaa4d5fa, offset = 0x00001094, len = 1014
+ 3. 'gasp' - checksum = 0xffff0003, offset = 0x00000a10, len = 8
+ 4. 'glyf' - checksum = 0xe737e2ca, offset = 0x000020dc, len = 37464
+ 5. 'head' - checksum = 0x0579aae0, offset = 0x0000148c, len = 54
+ 6. 'hhea' - checksum = 0x030a03d4, offset = 0x00000634, len = 36
+ 7. 'hmtx' - checksum = 0x472950a3, offset = 0x00001aa4, len = 1058
+ 8. 'loca' - checksum = 0x867eab72, offset = 0x00001ec8, len = 532
+ 9. 'maxp' - checksum = 0x014f009f, offset = 0x00000658, len = 32
+ 10. 'name' - checksum = 0x59125f2d, offset = 0x000014c4, len = 750
+ 11. 'post' - checksum = 0xc0d3c00b, offset = 0x000017b4, len = 752
+
+'maxp' Table - Maximum Profile
+------------------------------
+ 'maxp' version: 1.0
+ numGlyphs: 265
+ maxPoints: 156
+ maxContours: 4
+ maxCompositePoints: 0
+ maxCompositeContours: 0
+ maxZones: 2
+ maxTwilightPoints: 0
+ maxStorage: 1
+ maxFunctionDefs: 1
+ maxInstructionDefs: 0
+ maxStackElements: 64
+ maxSizeOfInstructions: 0
+ maxComponentElements: 0
+ maxCompoenetDepth: 0
+
diff --git a/Build/source/texk/ttfdump/tests/ttfdump.test b/Build/source/texk/ttfdump/tests/ttfdump.test
index 7592eaea5b0..e723c912785 100755
--- a/Build/source/texk/ttfdump/tests/ttfdump.test
+++ b/Build/source/texk/ttfdump/tests/ttfdump.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2011-2013 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2011-2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
TEXMFCNF=$srcdir/../kpathsea
@@ -9,41 +9,61 @@ export TEXMFCNF TTFONTS
failed=
-rm -rf FonetikaDaniaIwonaeRegular.ttf texmfhome.otf ttftest.* bad.*
-cp $srcdir/tests/FonetikaDaniaIwonaeRegular.ttf .
-cp $srcdir/tests/texmfhome.otf .
-cp $srcdir/tests/bad.otf .
+rm -rf ttftest.*
+#rm -rf FonetikaDaniaIwonaeRegular.ttf bad.otf test.ttc texmfhome.otf ttftest.*
+#cp $srcdir/tests/FonetikaDaniaIwonaeRegular.ttf .
+#cp $srcdir/tests/bad.otf .
+#cp $srcdir/tests/test.ttc .
+#cp $srcdir/tests/texmfhome.otf .
-./ttfdump -t glyf -g 1 -o ttftest.glyf FonetikaDaniaIwonaeRegular.ttf \
+echo "*** ttfdump -t glyf -g 1 -o ttftest.glyf FonetikaDaniaIwonaeRegular.ttf" \
+ && ./ttfdump -t glyf -g 1 -o ttftest.glyf FonetikaDaniaIwonaeRegular.ttf \
&& diff -b $srcdir/tests/ttfdump.glyf ttftest.glyf \
- && echo "ttfdump.glyf tests OK" \
+ && echo "ttfdump.glyf tests OK" && echo \
|| failed="$failed ttfdump.glyf"
-./ttfdump -t GPOS -o ttftest.gpos FonetikaDaniaIwonaeRegular.ttf \
+echo "*** ttfdump -t GPOS -o ttftest.gpos FonetikaDaniaIwonaeRegular.ttf" \
+ && ./ttfdump -t GPOS -o ttftest.gpos FonetikaDaniaIwonaeRegular.ttf \
&& diff -b $srcdir/tests/ttfdump.gpos ttftest.gpos \
- && echo "ttfdump.gpos tests OK" \
+ && echo "ttfdump.gpos tests OK" && echo \
|| failed="$failed ttfdump.gpos"
-./ttfdump -t GSUB -o ttftest.gsub FonetikaDaniaIwonaeRegular.ttf \
+echo "*** ttfdump -t GSUB -o ttftest.gsub FonetikaDaniaIwonaeRegular.ttf" \
+ && ./ttfdump -t GSUB -o ttftest.gsub FonetikaDaniaIwonaeRegular.ttf \
&& diff -b $srcdir/tests/ttfdump.gsub ttftest.gsub \
- && echo "ttfdump.gsub tests OK" \
+ && echo "ttfdump.gsub tests OK" && echo \
|| failed="$failed ttfdump.gsub"
-./ttfdump -t head FonetikaDaniaIwonaeRegular.ttf >ttftest.head \
+echo "*** ttfdump -t head FonetikaDaniaIwonaeRegular.ttf >ttftest.head" \
+ && ./ttfdump -t head FonetikaDaniaIwonaeRegular.ttf >ttftest.head \
&& diff -b $srcdir/tests/ttfdump.head ttftest.head \
- && echo "ttfdump.head tests OK" \
+ && echo "ttfdump.head tests OK" && echo \
|| failed="$failed ttfdump.head"
-./ttfdump -t OS/2 texmfhome.otf >ttftest.os_2 \
+echo "*** ttfdump -t OS/2 texmfhome.otf >ttftest.os_2" \
+ && ./ttfdump -t OS/2 texmfhome.otf >ttftest.os_2 \
&& diff -b $srcdir/tests/ttfdump.os_2 ttftest.os_2 \
- && echo "ttfdump.os_2 tests OK" \
+ && echo "ttfdump.os_2 tests OK" && echo \
|| failed="$failed ttfdump.os_2"
-./ttfdump -t OS/2 bad.otf >ttftest.bad \
+echo "*** ttfdump -t OS/2 bad.otf >ttftest.bad" \
+ && ./ttfdump -t OS/2 bad.otf >ttftest.bad \
&& diff -b $srcdir/tests/ttfdump.bad ttftest.bad \
- && echo "ttfdump.bad tests OK" \
+ && echo "ttfdump.bad tests OK" && echo \
|| failed="$failed ttfdump.bad"
+echo "*** ttfdump -t gasp -c 0 test.ttc >ttftest.gasp" \
+ && ./ttfdump -t gasp -c 0 test.ttc >ttftest.gasp \
+ && diff -b $srcdir/tests/ttfdump.gasp ttftest.gasp \
+ && echo "ttfdump.gasp tests OK" && echo \
+ || failed="$failed ttfdump.gasp"
+
+echo "*** ttfdump -t maxp -c 1 test.ttc >ttftest.maxp" \
+ && ./ttfdump -t maxp -c 1 test.ttc >ttftest.maxp \
+ && diff -b $srcdir/tests/ttfdump.maxp ttftest.maxp \
+ && echo "ttfdump.maxp tests OK" && echo \
+ || failed="$failed ttfdump.maxp"
+
test -z "$failed" && exit 0
echo "failed tests:$failed"
exit 1