summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/omegafonts
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/omegafonts')
-rw-r--r--Build/source/texk/web2c/omegafonts/ChangeLog9
-rw-r--r--Build/source/texk/web2c/omegafonts/Makefile.am7
-rw-r--r--Build/source/texk/web2c/omegafonts/Makefile.in10
-rw-r--r--Build/source/texk/web2c/omegafonts/font_routines.c10
-rwxr-xr-xBuild/source/texk/web2c/omegafonts/selectfont.test25
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/sample.out51
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/sample.ovp51
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/sample0-h.opl26
8 files changed, 182 insertions, 7 deletions
diff --git a/Build/source/texk/web2c/omegafonts/ChangeLog b/Build/source/texk/web2c/omegafonts/ChangeLog
index 6770ecec9af..a424611a4b3 100644
--- a/Build/source/texk/web2c/omegafonts/ChangeLog
+++ b/Build/source/texk/web2c/omegafonts/ChangeLog
@@ -1,3 +1,12 @@
+2011-12-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * font_routines.c (set_select_font): Select the correct MAPFONT.
+ Reported by Saito Shuzaburo via Akira Kakuto, 20 Dec 2011 08:49:10.
+
+ * selectfont.test, tests/sample.out, tests/sample.ovp,
+ tests/sample0-h.opl (new): Shell script and data for a new test.
+ * Makefile.am: Add the new test.
+
2011-05-30 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Use ../../am/bin_links.am for $(bindir) links.
diff --git a/Build/source/texk/web2c/omegafonts/Makefile.am b/Build/source/texk/web2c/omegafonts/Makefile.am
index 421354c1eec..d770627dd89 100644
--- a/Build/source/texk/web2c/omegafonts/Makefile.am
+++ b/Build/source/texk/web2c/omegafonts/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am for the TeX Live subdirectory texk/web2c/omegafonts/
##
-## Copyright (C) 2009 - 2011 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir) $(KPATHSEA_INCLUDES) -DNOT_WEB2C
@@ -102,7 +102,7 @@ endif OTANGLE
## Tests
##
-OMFONTS_tests = charwd.test level1.test omfonts.test repeat.test specialhex.test
+OMFONTS_tests = charwd.test level1.test omfonts.test repeat.test selectfont.test specialhex.test
if OTANGLE
if OMFONTS
TESTS = $(OMFONTS_tests)
@@ -125,6 +125,9 @@ DISTCLEANFILES += tests/Cherokee.tfm tests/OCherokee.ofm \
## repeat.test
EXTRA_DIST += tests/repeat.opl tests/repeated.opl
DISTCLEANFILES += tests/xrepeated.*
+## selectfont.test
+EXTRA_DIST += tests/sample.out tests/sample.ovp tests/sample0-h.opl
+DISTCLEANFILES += tests/sample*.ofm tests/sample.ovf tests/sample1-h.opl tests/xsample.out
## specialhex.test
EXTRA_DIST += tests/specialhex.ovp
DISTCLEANFILES += tests/specialhex.ofm tests/specialhex.opl \
diff --git a/Build/source/texk/web2c/omegafonts/Makefile.in b/Build/source/texk/web2c/omegafonts/Makefile.in
index f02ddb56a89..fe71848de41 100644
--- a/Build/source/texk/web2c/omegafonts/Makefile.in
+++ b/Build/source/texk/web2c/omegafonts/Makefile.in
@@ -369,8 +369,9 @@ DISTCLEANFILES = pl-parser.output tests/charwdr.* tests/charwdv.* \
tests/xlevel1.ofm tests/xlevel1.opl tests/Cherokee.tfm \
tests/OCherokee.ofm tests/OCherokee.opl tests/OCherokee.ovf \
tests/xCherokee.* tests/xOCherokee.* tests/xrepeated.* \
- tests/specialhex.ofm tests/specialhex.opl tests/specialhex.ovf \
- tests/xspecialhex.*
+ tests/sample*.ofm tests/sample.ovf tests/sample1-h.opl \
+ tests/xsample.out tests/specialhex.ofm tests/specialhex.opl \
+ tests/specialhex.ovf tests/xspecialhex.*
linked_programs = ofm2opl opl2ofm ovf2ovp ovp2ovf
bin_links = \
omfonts$(EXEEXT):ofm2opl \
@@ -378,11 +379,12 @@ bin_links = \
omfonts$(EXEEXT):ovf2ovp \
omfonts$(EXEEXT):ovp2ovf
-OMFONTS_tests = charwd.test level1.test omfonts.test repeat.test specialhex.test
+OMFONTS_tests = charwd.test level1.test omfonts.test repeat.test selectfont.test specialhex.test
@OMFONTS_TRUE@@OTANGLE_TRUE@TESTS = $(OMFONTS_tests)
EXTRA_DIST = $(OMFONTS_tests) tests/charwd-r.pl tests/charwd-v.vpl \
tests/level1.opl tests/Cherokee.pl tests/OCherokee.ovp \
- tests/repeat.opl tests/repeated.opl tests/specialhex.ovp
+ tests/repeat.opl tests/repeated.opl tests/sample.out \
+ tests/sample.ovp tests/sample0-h.opl tests/specialhex.ovp
all: all-am
.SUFFIXES:
diff --git a/Build/source/texk/web2c/omegafonts/font_routines.c b/Build/source/texk/web2c/omegafonts/font_routines.c
index c8557bd0a67..a7966590b28 100644
--- a/Build/source/texk/web2c/omegafonts/font_routines.c
+++ b/Build/source/texk/web2c/omegafonts/font_routines.c
@@ -446,7 +446,15 @@ get_hex(unsigned char c)
void
set_select_font(unsigned f)
{
- append_command_2(DVI_FNT_NUM_0, DVI_FNT_NUM_63, DVI_FNT_1, f);
+ unsigned i;
+
+ for (i = 0; i < no_fonts; i++)
+ if (f == font_table[i].font_number) {
+ append_command_2(DVI_FNT_NUM_0, DVI_FNT_NUM_63, DVI_FNT_1, i);
+ return;
+ }
+
+ internal_error_1("undefined MAPFONT %d cannot be selected", f);
}
void
diff --git a/Build/source/texk/web2c/omegafonts/selectfont.test b/Build/source/texk/web2c/omegafonts/selectfont.test
new file mode 100755
index 00000000000..ddabe3de870
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/selectfont.test
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+# Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+test -d tests || mkdir -p tests
+
+TEXMFCNF=$srcdir/../../kpathsea
+OFMFONTS=tests
+export TEXMFCNF OFMFONTS
+
+./omfonts -opl2ofm -verbose $srcdir/tests/sample0-h tests/sample0-h || exit 1
+
+./omfonts -opl2ofm -verbose $srcdir/tests/sample0-h tests/sample1-h || exit 1
+
+./omfonts -ofm2opl -verbose sample1-h tests/sample1-h || exit 1
+
+diff $srcdir/tests/sample0-h.opl tests/sample1-h.opl || exit 1
+
+./omfonts -ovp2ovf -verbose $srcdir/tests/sample tests/sample tests/sample || exit 1
+
+./omfonts -ovf2ovp -verbose tests/sample sample tests/xsample.out || exit 1
+
+diff $srcdir/tests/sample.out tests/xsample.out || exit 1
+
diff --git a/Build/source/texk/web2c/omegafonts/tests/sample.out b/Build/source/texk/web2c/omegafonts/tests/sample.out
new file mode 100644
index 00000000000..1f697187483
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/sample.out
@@ -0,0 +1,51 @@
+(VTITLE JVF for SAMPLE)
+(OFMLEVEL D 0)
+(FONTDIR TL)
+(FAMILY UNSPECIFIED)
+(FACE F MRR)
+(CODINGSCHEME UNSPECIFIED)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM H 0)
+(SEVENBITSAFEFLAG FALSE)
+(FONTDIMEN
+ )
+(MAPFONT D 0
+ (FONTNAME sample0-h)
+ (FONTCHECKSUM H 0)
+ (FONTAT R 1.0)
+ (FONTDSIZE R 10.0)
+ )
+(MAPFONT D 1
+ (FONTNAME sample1-h)
+ (FONTCHECKSUM H 0)
+ (FONTAT R 1.0)
+ (FONTDSIZE R 10.0)
+ )
+(COMMENT
+ (CHARWD_ENTRY D 0 R 0.0)
+ (CHARWD_ENTRY D 1 R 1.0)
+ )
+(COMMENT
+ (CHARHT_ENTRY D 0 R 0.0)
+ )
+(COMMENT
+ (CHARDP_ENTRY D 0 R 0.0)
+ )
+(COMMENT
+ (CHARIC_ENTRY D 0 R 0.0)
+ )
+(CHARACTER H 2121
+ (CHARWD R 1.0)
+ (MAP
+ (SETCHAR H 0)
+ )
+ )
+(CHARACTER H 2122
+ (CHARWD R 1.0)
+ (MAP
+ (SELECTFONT D 1)
+ (SETCHAR H 0)
+ )
+ )
diff --git a/Build/source/texk/web2c/omegafonts/tests/sample.ovp b/Build/source/texk/web2c/omegafonts/tests/sample.ovp
new file mode 100644
index 00000000000..d83bd6f2ed6
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/sample.ovp
@@ -0,0 +1,51 @@
+(VTITLE JVF for SAMPLE)
+(OFMLEVEL D 0)
+(FONTDIR TL)
+(FAMILY UNSPECIFIED)
+(FACE F MRR)
+(CODINGSCHEME UNSPECIFIED)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM H 0)
+(SEVENBITSAFEFLAG FALSE)
+(FONTDIMEN
+ )
+(MAPFONT D 0
+ (FONTNAME sample0-h)
+ (FONTCHECKSUM H 0)
+ (FONTAT R 1.0)
+ (FONTDSIZE R 10.0)
+ )
+(MAPFONT D 2
+ (FONTNAME sample1-h)
+ (FONTCHECKSUM H 0)
+ (FONTAT R 1.0)
+ (FONTDSIZE R 10.0)
+ )
+(COMMENT
+ (CHARWD_ENTRY D 0 R 0.0)
+ (CHARWD_ENTRY D 1 R 1.0)
+ )
+(COMMENT
+ (CHARHT_ENTRY D 0 R 0.0)
+ )
+(COMMENT
+ (CHARDP_ENTRY D 0 R 0.0)
+ )
+(COMMENT
+ (CHARIC_ENTRY D 0 R 0.0)
+ )
+(CHARACTER H 2121
+ (CHARWD R 1.0)
+ (MAP
+ (SETCHAR H 0)
+ )
+ )
+(CHARACTER H 2122
+ (CHARWD R 1.0)
+ (MAP
+ (SELECTFONT D 2)
+ (SETCHAR H 0)
+ )
+ )
diff --git a/Build/source/texk/web2c/omegafonts/tests/sample0-h.opl b/Build/source/texk/web2c/omegafonts/tests/sample0-h.opl
new file mode 100644
index 00000000000..e0b4e8a8c96
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/sample0-h.opl
@@ -0,0 +1,26 @@
+(FAMILY UNSPECIFIED)
+(FACE F MRR)
+(CODINGSCHEME UNSPECIFIED)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM H 11AB1731)
+(SEVENBITSAFEFLAG TRUE)
+(FONTDIMEN
+ )
+(COMMENT
+ (CHARWD_ENTRY D 0 R 0.0)
+ (CHARWD_ENTRY D 1 R 1.0)
+ )
+(COMMENT
+ (CHARHT_ENTRY D 0 R 0.0)
+ )
+(COMMENT
+ (CHARDP_ENTRY D 0 R 0.0)
+ )
+(COMMENT
+ (CHARIC_ENTRY D 0 R 0.0)
+ )
+(CHARACTER H 0
+ (CHARWD R 1.0)
+ )