summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-01-08 15:04:43 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-01-08 15:04:43 +0000
commit4b4eef55581b13870b9c50a659869b08eab3115f (patch)
treec7dcc5c291270e4347bf4d13affebba15487159b /Build/source
parentef3d3d2a405439fbfb04894c5185025dcd0a7f46 (diff)
texk/web2c/omegafonts: several bug fixes and additional test cases
git-svn-id: svn://tug.org/texlive/trunk@16640 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/omegafonts/ChangeLog75
-rw-r--r--Build/source/texk/web2c/omegafonts/Makefile.am11
-rw-r--r--Build/source/texk/web2c/omegafonts/Makefile.in17
-rw-r--r--Build/source/texk/web2c/omegafonts/char_routines.c108
-rw-r--r--Build/source/texk/web2c/omegafonts/char_routines.h2
-rw-r--r--Build/source/texk/web2c/omegafonts/dimen_routines.c4
-rw-r--r--Build/source/texk/web2c/omegafonts/extra_routines.c208
-rw-r--r--Build/source/texk/web2c/omegafonts/font_routines.h1
-rw-r--r--Build/source/texk/web2c/omegafonts/header_routines.c4
-rw-r--r--Build/source/texk/web2c/omegafonts/header_routines.h1
-rwxr-xr-xBuild/source/texk/web2c/omegafonts/level1.test14
-rw-r--r--Build/source/texk/web2c/omegafonts/ligkern_routines.h1
-rw-r--r--Build/source/texk/web2c/omegafonts/list_routines.c8
-rw-r--r--Build/source/texk/web2c/omegafonts/omfonts.c13
-rw-r--r--Build/source/texk/web2c/omegafonts/omfonts.h2
-rw-r--r--Build/source/texk/web2c/omegafonts/out_ofm.c24
-rw-r--r--Build/source/texk/web2c/omegafonts/out_ofm.h4
-rw-r--r--Build/source/texk/web2c/omegafonts/parse_ofm.c48
-rw-r--r--Build/source/texk/web2c/omegafonts/parser.h1
-rw-r--r--Build/source/texk/web2c/omegafonts/pl-parser.c197
-rw-r--r--Build/source/texk/web2c/omegafonts/pl-parser.y1
-rwxr-xr-xBuild/source/texk/web2c/omegafonts/repeat.test14
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/level1.opl39
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/repeat.opl93
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/repeated.opl84
25 files changed, 682 insertions, 292 deletions
diff --git a/Build/source/texk/web2c/omegafonts/ChangeLog b/Build/source/texk/web2c/omegafonts/ChangeLog
index 3ebfe628438..fc4c5dfa4ee 100644
--- a/Build/source/texk/web2c/omegafonts/ChangeLog
+++ b/Build/source/texk/web2c/omegafonts/ChangeLog
@@ -1,3 +1,78 @@
+2010-01-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * char_routines.c (check_existence_and_safety,
+ doublecheck_existence): Avoid segfault.
+ (check_and_correct): Call build_dimen_tables() after
+ check_existence_all_character_fields(), which may add a width.
+ (check_existence_all_character_fields): Print "" instead of NULL.
+
+ * extra_routines.c: Fix various bugs and glitches in handling of
+ extra font parameters (ivalues etc). Add warnings in case they
+ are used with OFMLEVEL<1.
+
+2010-01-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Implement basic functionality for OFMLEVEL=1 (CHARREPEAT only).
+
+ Part 1: ofm => opl:
+ * char_routines.c (print_characters), parse_ofm.c (ofm_organize):
+ Handle repeated characters..
+
+ Part 2: opl => ofm:
+ * char_routines.h (num_char_info, words_per_entry): New globals.
+ * char_routines.c (compute_ofm_character_info): Count char_infos.
+ (output_ofm_character_info): Output char_infos.
+ * out_ofm.c (compute_ofm_subsizes): Compute char_info size.
+ (output_ofm_file): Call compute_ofm_extra_stuff() much earlier.
+ (compute_ofm_subsizes): Move final check of bc, ec and related
+ error messages to char_routines.c (compute_ofm_character_info).
+ * extra_routines.c (output_ofm_extra_stuff): Allow OFMLEVEL=1
+ unless nki+nkp+nkm+nkf+nkr+nkg>0.
+
+ * omfonts.c: Version 2.1.
+
+ * level1.test, repeat.test, tests/level1.opl, tests/repeat.opl,
+ tests/repeated.opl (new): Shell scripts and data for new tests.
+ * Makefile.am: Add the new tests.
+
+2010-01-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Cleanup extern declarations:
+ char_routines.c (character_measures): Remove unused extern.
+ (bchar): Remove extern and #include "parse_ofm.h".
+ * parse_ofm.h: Extern decl of bchar (defined in parse_ofm.c).
+ * omfonts.h (file_ofm): Extern decl (defined in omfonts.c).
+ (output_ofm_header): Remove duplicate (in out_ofm.h).
+ * omfonts.c (yyin): Remove extern (declared in parser.h).
+ (output_ofm_header): #include "parse_ofm.h".
+ * out_ofm.c (header_ptr,mw,mh,md,mi): Remove unused externs.
+ (file_ofm): Remove extern and #include "omfonts.h".
+ * font_routines.h (cur_packet): Remove duplicate extern.
+ * header_routines.h (output_ofm_header): Remove duplicate extern.
+ * parser.h (yylval): Remove extern, declared in the generated
+ header pl-parser.h.
+ * pl-parser.y: #include "pl-parser.h" (for yylval).
+ * out_ofm.h (output_ofm_header): Remove (in header_routines.h).
+ (output_ofm_extra_stuff): Remove (in extra_routines.h).
+ (compute_ofm_character_info, output_ofm_character_info):
+ Remove (in char_routines.h).
+
+2010-01-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Minor bug fixes:
+ * char_routines.c (init_character): Fix a typo (bug?).
+ (init_planes): Drop initialization of char_max[plane_max].
+ (copy_characters, ensure_existence): Add check for non-existent
+ plane (plane>plane_max).
+ * dimen_routines.c (build_dimen_tables, retrieve_dimen_tables):
+ Replace malloc() by xmalloc().
+ * list_routines.c (in_cons, in_list1): Initialize index field.
+ (in_list2): Fix a typo (bug) and initialize index fields.
+ * parse_ofm.c (ofm_organize): Give correct OFMLEVEL in error
+ messages.
+ * header_routines.c (store_seven_bit_safe_flag,
+ output_ofm_header): Store as 0x80 (as does PLtoTF) and not 0x01.
+
2009-09-18 Peter Breitenlohner <peb@mppmu.mpg.de>
* header_routines.c (init_header): Call init_ofm_level() to
diff --git a/Build/source/texk/web2c/omegafonts/Makefile.am b/Build/source/texk/web2c/omegafonts/Makefile.am
index afe7082d8d2..ba20c96af96 100644
--- a/Build/source/texk/web2c/omegafonts/Makefile.am
+++ b/Build/source/texk/web2c/omegafonts/Makefile.am
@@ -83,19 +83,26 @@ endif OTANGLE
## Tests
##
+OMFONTS_tests = level1.test omfonts.test repeat.test specialhex.test
if OTANGLE
if OMFONTS
-TESTS = omfonts.test specialhex.test
+TESTS = $(OMFONTS_tests)
endif OMFONTS
endif OTANGLE
-EXTRA_DIST = omfonts.test specialhex.test
+EXTRA_DIST = $(OMFONTS_tests)
+## level1.test
+EXTRA_DIST += tests/level1.opl
+DISTCLEANFILES += tests/xlevel1.ofm tests/xlevel1.opl
## omfonts.test
EXTRA_DIST += tests/Cherokee.pl tests/OCherokee.ovp
DISTCLEANFILES += tests/Cherokee.tfm tests/OCherokee.ofm \
tests/OCherokee.opl tests/OCherokee.ovf \
tests/xCherokee.* tests/xOCherokee.*
+## repeat.test
+EXTRA_DIST += tests/repeat.opl tests/repeated.opl
+DISTCLEANFILES += tests/xrepeated.*
## 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 d0f96a4baae..bdc518ed6d9 100644
--- a/Build/source/texk/web2c/omegafonts/Makefile.in
+++ b/Build/source/texk/web2c/omegafonts/Makefile.in
@@ -342,14 +342,17 @@ omfonts_SOURCES = \
LDADD = $(proglib) $(KPATHSEA_LIBS)
omfonts_DEPENDENCIES = $(proglib) $(KPATHSEA_DEPEND)
-DISTCLEANFILES = pl-parser.output tests/Cherokee.tfm \
- tests/OCherokee.ofm tests/OCherokee.opl tests/OCherokee.ovf \
- tests/xCherokee.* tests/xOCherokee.* tests/specialhex.ofm \
- tests/specialhex.opl tests/specialhex.ovf tests/xspecialhex.*
+DISTCLEANFILES = pl-parser.output 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.*
linked_programs = ofm2opl opl2ofm ovf2ovp ovp2ovf
-@OMFONTS_TRUE@@OTANGLE_TRUE@TESTS = omfonts.test specialhex.test
-EXTRA_DIST = omfonts.test specialhex.test tests/Cherokee.pl \
- tests/OCherokee.ovp tests/specialhex.ovp
+OMFONTS_tests = level1.test omfonts.test repeat.test specialhex.test
+@OMFONTS_TRUE@@OTANGLE_TRUE@TESTS = $(OMFONTS_tests)
+EXTRA_DIST = $(OMFONTS_tests) tests/level1.opl tests/Cherokee.pl \
+ tests/OCherokee.ovp tests/repeat.opl tests/repeated.opl \
+ tests/specialhex.ovp
all: all-am
.SUFFIXES:
diff --git a/Build/source/texk/web2c/omegafonts/char_routines.c b/Build/source/texk/web2c/omegafonts/char_routines.c
index cdcaf68ba6a..26da39f8a86 100644
--- a/Build/source/texk/web2c/omegafonts/char_routines.c
+++ b/Build/source/texk/web2c/omegafonts/char_routines.c
@@ -34,6 +34,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#include "font_routines.h"
#include "out_ofm.h"
#include "omfonts.h"
+#include "parse_ofm.h"
#include "dvi.h"
#define PLANE 0x10000
@@ -85,14 +86,11 @@ int label_ptr, sort_ptr;
int lk_offset;
boolean extra_loc_needed;
-extern unsigned bchar;
-
void
init_planes(void)
{
plane_max = 0;
planes[plane_max] = NULL;
- char_max[plane_max] = 0;
}
void
@@ -109,7 +107,7 @@ init_character(unsigned c, char_entry *ready_made)
plane = c / PLANE;
index = c % PLANE;
for (i=plane_max+1; i<=plane; i++) {
- planes[plane] = NULL;
+ planes[i] = NULL;
}
if (planes[plane]==NULL) {
planes[plane] = (char_entry **)xmalloc(PLANE * sizeof(char_entry *));
@@ -170,7 +168,7 @@ copy_characters(unsigned c, unsigned copies)
}
plane = c / PLANE;
index = c % PLANE;
- if (planes[plane]==NULL)
+ if ((plane>plane_max) || (planes[plane]==NULL))
internal_error_1("copy_characters (plane %d)", plane);
the_entry = planes[plane][index];
if (the_entry==NULL)
@@ -187,7 +185,7 @@ ensure_existence(unsigned c)
plane = c / PLANE;
index = c % PLANE;
- if ((planes[plane]==NULL) || (planes[plane][index]==NULL)) {
+ if ((plane>plane_max) || (planes[plane]==NULL) || (planes[plane][index]==NULL)) {
init_character(c, NULL);
planes[plane][index]->defined = FALSE;
}
@@ -257,7 +255,7 @@ check_existence_all_character_fields(void)
break;
}
case TAG_LIST:{
- check_existence_and_safety(c, entry->remainder, NULL,
+ check_existence_and_safety(c, entry->remainder, "",
"%sCharacter (H %X) NEXTLARGER than (H %X) "
"has no CHARACTER spec");
break;
@@ -294,29 +292,32 @@ clear_ligature_entries(void)
void
check_existence_and_safety(unsigned c, unsigned g, const_string extra, const_string fmt)
{
- char_entry *gentry = planes[g/PLANE][g%PLANE];
+ char_entry *gentry;
if ((g<CHAR_MINIMUM) || (g>CHAR_MAXIMUM))
internal_error_1("check_existence_and_safety (g=%d)", g);
- gentry = planes[g/PLANE][g%PLANE];
+ ensure_existence(g);
+ gentry = current_secondary_character;
if ((g>=128) && (c<128))
seven_bit_calculated = 0;
- if ((gentry==NULL) || (gentry->defined == FALSE)) {
+ if (gentry->defined == FALSE) {
warning_s_2(fmt, extra, g, c);
current_character = gentry;
set_character_measure(C_WD, 0);
+ gentry->defined = TRUE;
}
}
void
doublecheck_existence(unsigned g, const_string extra, const_string fmt)
{
- char_entry *gentry = planes[g/PLANE][g%PLANE];
+ char_entry *gentry;
if ((g<CHAR_MINIMUM) || (g>CHAR_MAXIMUM))
internal_error_1("doublecheck_existence (g=%d)", g);
- gentry = planes[g/PLANE][g%PLANE];
- if ((gentry==NULL) || (gentry->defined == FALSE)) {
+ ensure_existence(g);
+ gentry = current_secondary_character;
+ if (gentry->defined == FALSE) {
warning_s_1(fmt, extra, g);
current_character = gentry;
/*
@@ -325,8 +326,6 @@ doublecheck_existence(unsigned g, const_string extra, const_string fmt)
}
}
-extern string character_measures[];
-
void
print_characters(boolean read_ovf)
{
@@ -335,10 +334,18 @@ print_characters(boolean read_ovf)
four_pieces *exten;
four_entries *lentry;
unsigned j,k;
+ unsigned copies = 0;
FOR_ALL_CHARACTERS(
+ if (copies > 0)
+ copies--;
+ else {
if (entry->index_indices[C_WD] != 0) {
- print_character(c);
+ copies = entry->copies;
+ if (copies > 0)
+ print_character_repeat(c, copies);
+ else
+ print_character(c);
for (k=C_MIN; k<C_MAX; k++) {
if (entry->index_indices[k] != 0) {
print_character_measure(k,
@@ -390,6 +397,7 @@ print_characters(boolean read_ovf)
right();
fflush(file_output);
}
+ }
)
}
@@ -689,13 +697,13 @@ print_labels(void)
void
check_and_correct(void)
{
+ check_existence_all_character_fields();
build_kern_table();
build_dimen_tables();
build_exten_table();
check_ligature_ends_properly();
compute_ofm_character_info();
adjust_labels(TRUE);
- check_existence_all_character_fields();
calculate_seven_bit_safe_flag();
check_ligature_infinite_loops();
check_charlist_infinite_loops();
@@ -825,6 +833,8 @@ output_ofm_extensible(void)
}
}
+unsigned num_char_info, words_per_entry;
+
void
compute_ofm_character_info(void)
{
@@ -839,6 +849,10 @@ compute_ofm_character_info(void)
if (c < bc) bc = c;
if (c > ec) ec = c;
)
+ if (bc > ec) bc = 1;
+ if (ec>255)
+ fatal_error_1(
+ "Char (%x) too big for TFM (max ff); use OFM file",ec);
break;
}
case OFM_LEVEL0: {
@@ -846,14 +860,32 @@ compute_ofm_character_info(void)
if (c < bc) bc = c;
if (c > ec) ec = c;
)
+ if (ec>65535)
+ fatal_error_1(
+ "Char (%x) too big for OFM level-0 (max ffff); use level-2",
+ ec);
+ if (bc > ec) bc = 1;
break;
}
-/* Level 1 only uses plane 0. Take advantage of this fact. */
case OFM_LEVEL1: {
+ unsigned copies = 0, repeats = 0;
FOR_ALL_CHARACTERS(
if (c < bc) bc = c;
if (c > ec) ec = c;
+ if (copies > 0)
+ copies--;
+ else {
+ copies = entry->copies;
+ repeats += copies;
+ }
)
+ if (ec>65535)
+ fatal_error_1(
+ "Char (%x) too big for OFM level-1 (max ffff); use level-2",
+ ec);
+ if (bc > ec) bc = 1;
+ num_char_info = ec + 1 - bc - repeats;
+ /* Level 1 only uses plane 0. Take advantage of this fact. */
break;
}
default: { internal_error_0("compute_ofm_character_info"); }
@@ -928,7 +960,45 @@ output_ofm_character_info(void)
break;
}
case OFM_LEVEL1: {
- internal_error_0("OFM level 1 not currently supported");
+ unsigned i;
+ plane=0;
+ for (index = bc; index <=ec; index++) {
+ entry = planes[plane][index];
+ c = plane*PLANE + index;
+ if (entry == NULL) {
+ for (i=0; i<words_per_entry; i++)
+ out_ofm_4(0);
+ } else {
+ unsigned copies = entry->copies;
+ if (entry->indices[C_WD] != NULL)
+ wd = entry->indices[C_WD]->index;
+ else wd = 0;
+ if (entry->indices[C_HT] != NULL)
+ ht = entry->indices[C_HT]->index;
+ else ht = 0;
+ if (entry->indices[C_DP] != NULL)
+ dp = entry->indices[C_DP]->index;
+ else dp = 0;
+ if (entry->indices[C_IC] != NULL)
+ ic = entry->indices[C_IC]->index;
+ else ic = 0;
+ out_ofm_2(wd);
+ out_ofm(ht);
+ out_ofm(dp);
+ out_ofm(ic);
+ /* assume no ctag */
+ out_ofm(entry->tag);
+ out_ofm_2(entry->remainder);
+ out_ofm_2(copies);
+ /* assume no character params */
+ for (i=0; i<npc; i++)
+ out_ofm_2(0);
+ /* padding */
+ if (0 == npc % 2)
+ out_ofm_2(0);
+ index += copies;
+ }
+ }
break;
}
default: { internal_error_0("compute_ofm_character_info"); }
diff --git a/Build/source/texk/web2c/omegafonts/char_routines.h b/Build/source/texk/web2c/omegafonts/char_routines.h
index f817a56338d..b0f35256f29 100644
--- a/Build/source/texk/web2c/omegafonts/char_routines.h
+++ b/Build/source/texk/web2c/omegafonts/char_routines.h
@@ -38,6 +38,8 @@ typedef struct char_entry_struct {
extern char_entry *current_character;
extern char_entry *current_secondary_character;
+extern unsigned num_char_info, words_per_entry;
+
extern void print_characters(boolean);
extern void init_character(unsigned, char_entry *);
extern void copy_characters(unsigned, unsigned);
diff --git a/Build/source/texk/web2c/omegafonts/dimen_routines.c b/Build/source/texk/web2c/omegafonts/dimen_routines.c
index 3b47b6dc08d..26387e148b1 100644
--- a/Build/source/texk/web2c/omegafonts/dimen_routines.c
+++ b/Build/source/texk/web2c/omegafonts/dimen_routines.c
@@ -232,7 +232,7 @@ build_dimen_tables(void)
if (measure_max_entries[i] != 0) {
delta=shorten(i,measure_max_entries[i]);
set_indices(i,delta);
- dimen_tables[i] = (int *) malloc((measure_max[i]+1)*sizeof(int));
+ dimen_tables[i] = (int *) xmalloc((measure_max[i]+1)*sizeof(int));
L1 = measure_list[i];
j=0;
while (lval(L1) != WEB_INFINITY) {
@@ -268,7 +268,7 @@ retrieve_dimen_tables(void)
dimen_tables[i] = NULL;
}
for (i=C_MIN; i<=C_MAX; i++) {
- dimen_tables[i] = (int *) malloc((measure_max[i]+1)*sizeof(int));
+ dimen_tables[i] = (int *) xmalloc((measure_max[i]+1)*sizeof(int));
for (j=0; j<measure_max[i]; j++) {
k = measure_base[i]+4*j;
dimen_tables[i][j] = (((*k)&0xff) << 24) |
diff --git a/Build/source/texk/web2c/omegafonts/extra_routines.c b/Build/source/texk/web2c/omegafonts/extra_routines.c
index afb68a48907..109c8681815 100644
--- a/Build/source/texk/web2c/omegafonts/extra_routines.c
+++ b/Build/source/texk/web2c/omegafonts/extra_routines.c
@@ -89,33 +89,64 @@ unsigned nwg=0;
void
compute_ofm_extra_stuff(void)
{
- unsigned i=0;
+ unsigned i;
- if (ofm_level >= OFM_LEVEL1) {
- nki = no_ivalue_tables;
- nkp = no_penalty_tables;
- nkm = no_mvalue_tables;
- nkf = no_fvalue_tables;
- nkr = no_rule_tables;
- nkg = no_glue_tables;
- for (i=0; i<nki; i++) {
+ /* discard trailing empty tables */
+ for (i=0; i<no_ivalue_tables; i++)
+ if (max_ivalue_entry[i] > 0) {
+ nki = i + 1;
nwi += max_ivalue_entry[i];
}
- for (i=0; i<nkp; i++) {
+ for (i=0; i<no_penalty_tables; i++)
+ if (max_penalty_entry[i] > 0) {
+ nkp = i + 1;
nwp += max_penalty_entry[i];
}
- for (i=0; i<nkm; i++) {
+ for (i=0; i<no_mvalue_tables; i++)
+ if (max_mvalue_entry[i] > 0) {
+ nkm = i + 1;
nwm += max_mvalue_entry[i];
}
- for (i=0; i<nkf; i++) {
+ for (i=0; i<no_fvalue_tables; i++)
+ if (max_fvalue_entry[i] > 0) {
+ nkf = i + 1;
nwf += max_fvalue_entry[i];
}
- for (i=0; i<nkr; i++) {
+ for (i=0; i<no_rule_tables; i++)
+ if (max_rule_entry[i] > 0) {
+ nkr = i + 1;
nwr += 3 * max_rule_entry[i];
}
- for (i=0; i<nkg; i++) {
+ for (i=0; i<no_glue_tables; i++)
+ if (max_glue_entry[i] > 0) {
+ nkg = i + 1;
nwg += 4 * max_glue_entry[i];
}
+ if (ofm_level < OFM_LEVEL1) {
+ if (no_ivalue_tables > 0) {
+ warning_2("Ignoring %d words in %d IVALUE tables", nwi, nki);
+ nki = nwi = 0;
+ }
+ if (no_penalty_tables > 0) {
+ warning_2("Ignoring %d words in %d PENALTY tables", nwp, nkp);
+ nkp = nwp = 0;
+ }
+ if (no_mvalue_tables > 0) {
+ warning_2("Ignoring %d words in %d MVALUE tables", nwm, nkm);
+ nkm = nwm = 0;
+ }
+ if (no_fvalue_tables > 0) {
+ warning_2("Ignoring %d words in %d FVALUE tables", nwf, nkf);
+ nkf = nwf = 0;
+ }
+ if (no_rule_tables > 0) {
+ warning_2("Ignoring %d words in %d RULE tables", nwr, nkr);
+ nkr = nwr = 0;
+ }
+ if (no_glue_tables > 0) {
+ warning_2("Ignoring %d words in %d GLUE tables", nwg, nkg);
+ nkg = nwg = 0;
+ }
}
}
@@ -123,7 +154,9 @@ void
output_ofm_extra_stuff(void)
{
if (ofm_level >= OFM_LEVEL1) {
+ if (nki+nkp+nkm+nkf+nkr+nkg > 0) {
fatal_error_0("OFM level 1 not currently supported");
+ }
}
}
@@ -148,148 +181,114 @@ init_all_tables(void)
void
init_font_ivalue(unsigned tab)
{
- unsigned j;
-
if (tab>=MAX_EXTRA_TABLES)
internal_error_1("init_font_ivalue (tab=%d)", tab);
if (ivalue_tables[tab] != NULL) {
warning_1("IVALUE table (D %d) previously defined; "
"old value ignored", tab);
- cur_ivalue_table = ivalue_tables[tab];
- for (j=0; j<MAX_TABLE_ENTRIES; j++) {
- cur_ivalue_table[j] = 0;
- }
- } else {
- no_ivalue_tables++;
- ivalue_tables[tab] =
- (unsigned *) xmalloc(MAX_TABLE_ENTRIES*sizeof(unsigned));
- cur_ivalue_table = ivalue_tables[tab];
+ free(ivalue_tables[tab]);
}
+ ivalue_tables[tab] =
+ (unsigned *) xcalloc(MAX_TABLE_ENTRIES, sizeof(unsigned));
+ if (tab >= no_ivalue_tables)
+ no_ivalue_tables = tab + 1;
+ cur_ivalue_table_index = tab;
+ cur_ivalue_table = ivalue_tables[tab];
max_ivalue_entry[tab] = 0;
}
void
init_font_penalty(unsigned tab)
{
- unsigned j;
-
if (tab>=MAX_EXTRA_TABLES)
internal_error_1("init_font_penalty (tab=%d)", tab);
if (penalty_tables[tab] != NULL) {
- warning_1("IVALUE table (D %d) previously defined; "
+ warning_1("PENALTY table (D %d) previously defined; "
"old value ignored", tab);
- cur_penalty_table = ivalue_tables[tab];
- for (j=0; j<MAX_TABLE_ENTRIES; j++) {
- cur_penalty_table[j] = 0;
- }
- } else {
- no_penalty_tables++;
- penalty_tables[tab] =
- (unsigned *) xmalloc(MAX_TABLE_ENTRIES*sizeof(unsigned));
- cur_penalty_table = ivalue_tables[tab];
+ free(penalty_tables[tab]);
}
+ penalty_tables[tab] =
+ (unsigned *) xcalloc(MAX_TABLE_ENTRIES, sizeof(unsigned));
+ cur_penalty_table_index = tab;
+ cur_penalty_table = penalty_tables[tab];
+ if (tab >= no_penalty_tables)
+ no_penalty_tables = tab + 1;
max_penalty_entry[tab] = 0;
}
void
init_font_mvalue(unsigned tab)
{
- unsigned j;
-
if (tab>=MAX_EXTRA_TABLES)
internal_error_1("init_font_mvalue (tab=%d)", tab);
if (mvalue_tables[tab] != NULL) {
warning_1("MVALUE table (D %d) previously defined; "
"old value ignored", tab);
- cur_mvalue_table = mvalue_tables[tab];
- for (j=0; j<MAX_TABLE_ENTRIES; j++) {
- cur_mvalue_table[j] = 0;
- }
- } else {
- no_mvalue_tables++;
- mvalue_tables[tab] =
- (fix *) xmalloc(MAX_TABLE_ENTRIES*sizeof(unsigned));
- cur_mvalue_table = mvalue_tables[tab];
+ free(mvalue_tables[tab]);
}
+ mvalue_tables[tab] =
+ (fix *) xcalloc(MAX_TABLE_ENTRIES, sizeof(fix));
+ if (tab >= no_mvalue_tables)
+ no_mvalue_tables = tab + 1;
+ cur_mvalue_table_index = tab;
+ cur_mvalue_table = mvalue_tables[tab];
max_mvalue_entry[tab] = 0;
}
void
init_font_fvalue(unsigned tab)
{
- unsigned j;
-
if (tab>=MAX_EXTRA_TABLES)
internal_error_1("init_font_fvalue (tab=%d)", tab);
if (fvalue_tables[tab] != NULL) {
warning_1("FVALUE table (D %d) previously defined; "
"old value ignored", tab);
- cur_fvalue_table = fvalue_tables[tab];
- for (j=0; j<MAX_TABLE_ENTRIES; j++) {
- cur_fvalue_table[j] = 0;
- }
- } else {
- no_fvalue_tables++;
- fvalue_tables[tab] =
- (fix *) xmalloc(MAX_TABLE_ENTRIES*sizeof(unsigned));
- cur_fvalue_table = fvalue_tables[tab];
+ free(fvalue_tables[tab]);
}
+ fvalue_tables[tab] =
+ (fix *) xcalloc(MAX_TABLE_ENTRIES, sizeof(fix));
+ if (tab >= no_fvalue_tables)
+ no_fvalue_tables = tab + 1;
+ cur_fvalue_table_index = tab;
+ cur_fvalue_table = fvalue_tables[tab];
max_fvalue_entry[tab] = 0;
}
void
init_font_rule(unsigned tab)
{
- unsigned j;
-
if (tab>=MAX_EXTRA_TABLES)
internal_error_1("init_font_rule (tab=%d)", tab);
if (rule_tables[tab] != NULL) {
warning_1("RULE table (D %d) previously defined; "
"old value ignored", tab);
- cur_rule_table = rule_tables[tab];
- for (j=0; j<MAX_TABLE_ENTRIES; j++) {
- cur_rule_table[j].rule_wd = 0;
- cur_rule_table[j].rule_dp = 0;
- cur_rule_table[j].rule_ht = 0;
- }
- } else {
- no_rule_tables++;
- rule_tables[tab] =
- (rule *) xmalloc(MAX_TABLE_ENTRIES*sizeof(rule));
- cur_rule_table = rule_tables[tab];
+ free(rule_tables[tab]);
}
+ rule_tables[tab] =
+ (rule *) xcalloc(MAX_TABLE_ENTRIES, sizeof(rule));
+ if (tab >= no_rule_tables)
+ no_rule_tables = tab + 1;
+ cur_rule_table_index = tab;
+ cur_rule_table = rule_tables[tab];
max_rule_entry[tab] = 0;
}
void
init_font_glue(unsigned tab)
{
- unsigned j;
-
if (tab>=MAX_EXTRA_TABLES)
internal_error_1("init_font_glue (tab=%d)", tab);
if (glue_tables[tab] != NULL) {
warning_1("GLUE table (D %d) previously defined; "
"old value ignored", tab);
- cur_glue_table = glue_tables[tab];
- for (j=0; j<MAX_TABLE_ENTRIES; j++) {
- cur_glue_table[j].glue_width = 0;
- cur_glue_table[j].glue_stretch = 0;
- cur_glue_table[j].glue_shrink = 0;
- cur_glue_table[j].glue_stretch_order = 0;
- cur_glue_table[j].glue_shrink_order = 0;
- cur_glue_table[j].glue_type = 0;
- cur_glue_table[j].glue_arg_type = GLUEARG_NONE;
- cur_glue_table[j].glue_arg1 = 0;
- cur_glue_table[j].glue_arg2 = 0;
- }
- } else {
- no_glue_tables++;
- glue_tables[tab] =
- (glue *) xmalloc(MAX_TABLE_ENTRIES*sizeof(glue));
- cur_glue_table = glue_tables[tab];
+ free(glue_tables[tab]);
}
+ glue_tables[tab] =
+ (glue *) xcalloc(MAX_TABLE_ENTRIES, sizeof(glue));
+ if (tab >= no_glue_tables)
+ no_glue_tables = tab + 1;
+ cur_glue_table_index = tab;
+ cur_glue_table = glue_tables[tab];
max_glue_entry[tab] = 0;
}
@@ -300,8 +299,8 @@ init_font_ivalue_entry(unsigned index)
if (index>=MAX_TABLE_ENTRIES)
internal_error_1("init_font_ivalue_entry (index=%d)", index);
cur_ivalue_entry = &cur_ivalue_table[index];
- if (max_ivalue_entry[cur_ivalue_table_index]<index)
- max_ivalue_entry[cur_ivalue_table_index] = index;
+ if (max_ivalue_entry[cur_ivalue_table_index] <= index)
+ max_ivalue_entry[cur_ivalue_table_index] = index + 1;
}
void
@@ -310,8 +309,8 @@ init_font_penalty_entry(unsigned index)
if (index>=MAX_TABLE_ENTRIES)
internal_error_1("init_font_penalty_entry (index=%d)", index);
cur_penalty_entry = &cur_penalty_table[index];
- if (max_penalty_entry[cur_penalty_table_index]<index)
- max_penalty_entry[cur_penalty_table_index] = index;
+ if (max_penalty_entry[cur_penalty_table_index] <= index)
+ max_penalty_entry[cur_penalty_table_index] = index + 1;
}
void
@@ -320,8 +319,8 @@ init_font_mvalue_entry(unsigned index)
if (index>=MAX_TABLE_ENTRIES)
internal_error_1("init_font_mvalue_entry (index=%d)", index);
cur_mvalue_entry = &cur_mvalue_table[index];
- if (max_mvalue_entry[cur_mvalue_table_index]<index)
- max_mvalue_entry[cur_mvalue_table_index] = index;
+ if (max_mvalue_entry[cur_mvalue_table_index] <= index)
+ max_mvalue_entry[cur_mvalue_table_index] = index + 1;
}
void
@@ -330,8 +329,8 @@ init_font_fvalue_entry(unsigned index)
if (index>=MAX_TABLE_ENTRIES)
internal_error_1("init_font_fvalue_entry (index=%d)", index);
cur_fvalue_entry = &cur_fvalue_table[index];
- if (max_fvalue_entry[cur_fvalue_table_index]<index)
- max_fvalue_entry[cur_fvalue_table_index] = index;
+ if (max_fvalue_entry[cur_fvalue_table_index] <= index)
+ max_fvalue_entry[cur_fvalue_table_index] = index + 1;
}
void
@@ -340,8 +339,8 @@ init_font_rule_entry(unsigned index)
if (index>=MAX_TABLE_ENTRIES)
internal_error_1("init_font_rule_entry (index=%d)", index);
cur_rule_entry = &cur_rule_table[index];
- if (max_rule_entry[cur_rule_table_index]<index)
- max_rule_entry[cur_rule_table_index] = index;
+ if (max_rule_entry[cur_rule_table_index] <= index)
+ max_rule_entry[cur_rule_table_index] = index + 1;
}
void
@@ -350,8 +349,8 @@ init_font_glue_entry(unsigned index)
if (index>=MAX_TABLE_ENTRIES)
internal_error_1("init_font_glue_entry (index=%d)", index);
cur_glue_entry = &cur_glue_table[index];
- if (max_glue_entry[cur_glue_table_index]<index)
- max_glue_entry[cur_glue_table_index] = index;
+ if (max_glue_entry[cur_glue_table_index] <= index)
+ max_glue_entry[cur_glue_table_index] = index + 1;
}
@@ -411,10 +410,11 @@ set_font_glue_shrink_stretch(unsigned shrink_stretch,
{
switch (shrink_stretch) {
case GLUE_SHRINK: {
- cur_glue_entry->glue_shrink = width; break;
+ cur_glue_entry->glue_shrink = width;
cur_glue_entry->glue_shrink_order = order; break;
}
case GLUE_STRETCH: {
+ cur_glue_entry->glue_stretch = width;
cur_glue_entry->glue_stretch_order = order; break;
}
default: {
diff --git a/Build/source/texk/web2c/omegafonts/font_routines.h b/Build/source/texk/web2c/omegafonts/font_routines.h
index d4576a7dc6f..8c50430474f 100644
--- a/Build/source/texk/web2c/omegafonts/font_routines.h
+++ b/Build/source/texk/web2c/omegafonts/font_routines.h
@@ -48,7 +48,6 @@ extern font *font_table;
extern unsigned no_fonts;
extern unsigned cur_font_index;
extern font *cur_font;
-extern unsigned char *cur_packet;
extern string vtitle;
diff --git a/Build/source/texk/web2c/omegafonts/header_routines.c b/Build/source/texk/web2c/omegafonts/header_routines.c
index 3903090bc9e..b67be3119e1 100644
--- a/Build/source/texk/web2c/omegafonts/header_routines.c
+++ b/Build/source/texk/web2c/omegafonts/header_routines.c
@@ -534,7 +534,7 @@ set_seven_bit_safe_flag(unsigned f)
void
store_seven_bit_safe_flag(void)
{
- store_header_byte(LOC_SEVEN_FLAG, seven_bit);
+ store_header_byte(LOC_SEVEN_FLAG, seven_bit ? 0x80 : 0);
}
void
@@ -636,7 +636,7 @@ output_ofm_header(void)
for (j=0; j<k2; j++) out_ofm(family[j]);
for (j=k2; j<LEN_FAMILY; j++) out_ofm(0);
if ((ofm_level==OFM_TFM) && (seven_bit_specified==TRUE))
- out_ofm(seven_bit);
+ out_ofm(seven_bit ? 0x80 : 0);
else
out_ofm(0);
out_ofm(0); out_ofm(0); out_ofm(face);
diff --git a/Build/source/texk/web2c/omegafonts/header_routines.h b/Build/source/texk/web2c/omegafonts/header_routines.h
index d06eee048fa..b6d1fddf9a5 100644
--- a/Build/source/texk/web2c/omegafonts/header_routines.h
+++ b/Build/source/texk/web2c/omegafonts/header_routines.h
@@ -104,4 +104,3 @@ extern void output_ofm_header(void);
extern void set_ofm_level(unsigned);
extern void set_font_dir(unsigned);
-extern void output_ofm_header(void);
diff --git a/Build/source/texk/web2c/omegafonts/level1.test b/Build/source/texk/web2c/omegafonts/level1.test
new file mode 100755
index 00000000000..d3609ba1e2e
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/level1.test
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+# Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+test -d tests || mkdir -p tests
+
+./omfonts -opl2ofm -verbose $srcdir/tests/level1 tests/xlevel1 || exit 1
+
+TEXMFCNF=$srcdir/../../kpathsea \
+ ./omfonts -ofm2opl -verbose tests/xlevel1 tests/xlevel1 || exit 1
+
+diff $srcdir/tests/level1.opl tests/xlevel1.opl || exit 1
+
diff --git a/Build/source/texk/web2c/omegafonts/ligkern_routines.h b/Build/source/texk/web2c/omegafonts/ligkern_routines.h
index 66a9be31ca0..abb2e3746c7 100644
--- a/Build/source/texk/web2c/omegafonts/ligkern_routines.h
+++ b/Build/source/texk/web2c/omegafonts/ligkern_routines.h
@@ -21,6 +21,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
*/
+extern unsigned bchar;
extern four_entries lig_kern_table[100000];
extern void init_ligkern_entry(void);
diff --git a/Build/source/texk/web2c/omegafonts/list_routines.c b/Build/source/texk/web2c/omegafonts/list_routines.c
index 35e390c0527..1c1d109e8ff 100644
--- a/Build/source/texk/web2c/omegafonts/list_routines.c
+++ b/Build/source/texk/web2c/omegafonts/list_routines.c
@@ -131,6 +131,7 @@ in_cons (int val, in_list N, in_list L)
{
in_list temp;
temp = (in_list) xmalloc(sizeof(in_cell));
+temp->index = 0;
temp->value = val;
temp->actual = N;
temp->ptr = L;
@@ -142,6 +143,7 @@ in_list1 (int val, in_list N)
{
in_list temp;
temp = (in_list) xmalloc(sizeof(in_cell));
+temp->index = 0;
temp->value = val;
temp->actual = N;
temp->ptr = NULL;
@@ -154,11 +156,13 @@ in_list2 (int val, in_list N, int val1, in_list N1)
in_list temp, temp1;
temp = (in_list) xmalloc(sizeof(in_cell));
temp1 = (in_list) xmalloc(sizeof(in_cell));
+temp->index = 0;
temp->value = val;
-temp->ptr = temp1;
temp->actual = N;
+temp->ptr = temp1;
+temp1->index = 0;
temp1->value = val1;
-temp->actual = N1;
+temp1->actual = N1;
temp1->ptr = NULL;
return temp;
}
diff --git a/Build/source/texk/web2c/omegafonts/omfonts.c b/Build/source/texk/web2c/omegafonts/omfonts.c
index 05918b1748d..d2a9d8b0288 100644
--- a/Build/source/texk/web2c/omegafonts/omfonts.c
+++ b/Build/source/texk/web2c/omegafonts/omfonts.c
@@ -37,6 +37,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#include "char_routines.h"
#include "dimen_routines.h"
#include "parse_ofm.h"
+#include "out_ofm.h"
#define PROG_MIN 0
#define PROG_OFM2OPL 0
@@ -46,8 +47,6 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#define PROG_OMFONTS 4
#define PROG_NUM 5
-extern FILE *yyin;
-
#define cmdline(i) (argv[i])
int verbose_option;
@@ -91,11 +90,11 @@ static const_string names_program[PROG_NUM] =
static const_string *names_help[PROG_NUM] =
{ OFM2OPLHELP, OPL2OFMHELP, OVF2OVPHELP, OVP2OVFHELP, OMFONTSHELP };
static const_string names_msg[PROG_NUM] = {
- "This is ofm2opl, Version 2.0",
- "This is opl2ofm, Version 2.0",
- "This is ovf2ovp, Version 2.0",
- "This is ovp2ovf, Version 2.0",
- "This is omfomts, Version 2.0"
+ "This is ofm2opl, Version 2.1",
+ "This is opl2ofm, Version 2.1",
+ "This is ovf2ovp, Version 2.1",
+ "This is ovp2ovf, Version 2.1",
+ "This is omfomts, Version 2.1"
};
int no_files=0;
diff --git a/Build/source/texk/web2c/omegafonts/omfonts.h b/Build/source/texk/web2c/omegafonts/omfonts.h
index 8889f501a41..79516146e60 100644
--- a/Build/source/texk/web2c/omegafonts/omfonts.h
+++ b/Build/source/texk/web2c/omegafonts/omfonts.h
@@ -28,6 +28,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#define TEXT_CODE_UPPER 0
#define TEXT_CODE_MIXED 1
+extern FILE *file_ofm;
extern FILE *file_ovf;
extern FILE *file_output;
extern int verbose_option;
@@ -44,7 +45,6 @@ extern unsigned char *ovf;
extern int main(int, string *);
extern void read_in_whole(unsigned char **, unsigned *, FILE *, string );
extern void init_tables(void);
-extern void output_ofm_file(void);
extern void output_ovf_file(void);
extern void output_text_file(FILE *);
diff --git a/Build/source/texk/web2c/omegafonts/out_ofm.c b/Build/source/texk/web2c/omegafonts/out_ofm.c
index 300b7c66c98..2bc0a48cc32 100644
--- a/Build/source/texk/web2c/omegafonts/out_ofm.c
+++ b/Build/source/texk/web2c/omegafonts/out_ofm.c
@@ -25,6 +25,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#include "list_routines.h"
#include "header_routines.h"
#include "manifests.h"
+#include "omfonts.h"
#include "char_routines.h"
#include "ligkern_routines.h"
#include "out_ofm.h"
@@ -38,11 +39,11 @@ void
output_ofm_file(void)
{
check_and_correct();
+ compute_ofm_extra_stuff();
compute_ofm_character_info();
compute_ofm_subsizes();
output_ofm_subsizes();
output_ofm_header();
- compute_ofm_extra_stuff();
output_ofm_extra_stuff();
output_ofm_character_info();
output_ofm_dimension();
@@ -51,32 +52,19 @@ output_ofm_file(void)
output_ofm_parameter();
}
-extern unsigned header_ptr;
-extern unsigned mw,mh,md,mi;
-
void
compute_ofm_subsizes(void)
{
switch(ofm_level) {
case OFM_TFM: {
lh = header_max + 1;
- if (bc > ec) bc = 1;
- if (ec>255)
- fatal_error_1(
- "Char (%x) too big for TFM (max ff); use OFM file",ec);
nw++; nh++; nd++; ni++;
compute_ligkern_offset();
lf = 6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+lk_offset+nk+ne+np;
- /*lf = 6+lh+(ec-bc+1)+nw+nh+nd+ni+nl-1+lk_offset+nk+ne+np;*/
break;
}
case OFM_LEVEL0: {
lh = header_max + 1;
- if (ec>65535)
- fatal_error_1(
- "Char (%x) too big for OFM level-0 (max ffff); use level-2",
- ec);
- if (bc > ec) bc = 1;
nw++; nh++; nd++; ni++;
compute_ligkern_offset();
lf = 14+lh+2*(ec-bc+1)+nw+nh+nd+ni+2*(nl+lk_offset)+nk+2*ne+np;
@@ -84,13 +72,10 @@ compute_ofm_subsizes(void)
}
case OFM_LEVEL1: {
lh = header_max + 1;
- if (ec>65535)
- fatal_error_1(
- "Char (%x) too big for OFM level-1 (max ffff); use level-2",
- ec);
- if (bc > ec) bc = 1;
nw++; nh++; nd++; ni++;
compute_ligkern_offset();
+ words_per_entry = (12 + 2*npc) / 4;
+ ncw = num_char_info * words_per_entry;
lf = 29+lh+ncw+nw+nh+nd+ni+2*(nl+lk_offset)+nk+2*ne+np+
nki+nwi+nkf+nwf+nkm+nwm+nkr+nwr+nkg+nwg+nkp+nwp;
nco = 29+lh+nki+nwi+nkf+nwf+nkm+nwm+nkr+nwr+nkg+nwg+nkp+nwp;
@@ -138,7 +123,6 @@ output_ofm_subsizes(void)
}
}
-extern FILE *file_ofm;
unsigned file_ofm_count = 0;
void
diff --git a/Build/source/texk/web2c/omegafonts/out_ofm.h b/Build/source/texk/web2c/omegafonts/out_ofm.h
index 3a519f79a4b..183be26f7f6 100644
--- a/Build/source/texk/web2c/omegafonts/out_ofm.h
+++ b/Build/source/texk/web2c/omegafonts/out_ofm.h
@@ -30,7 +30,3 @@ extern void out_ofm(unsigned);
extern void compute_ofm_subsizes(void);
extern void output_ofm_subsizes(void);
-extern void output_ofm_header(void);
-extern void output_ofm_extra_stuff(void);
-extern void compute_ofm_character_info(void);
-extern void output_ofm_character_info(void);
diff --git a/Build/source/texk/web2c/omegafonts/parse_ofm.c b/Build/source/texk/web2c/omegafonts/parse_ofm.c
index 82eb53b2237..fc22024233b 100644
--- a/Build/source/texk/web2c/omegafonts/parse_ofm.c
+++ b/Build/source/texk/web2c/omegafonts/parse_ofm.c
@@ -103,7 +103,7 @@ parse_ofm(boolean read_ovf)
void
ofm_organize(void)
{
- unsigned char_ptr,copies,i,j;
+ unsigned copies,i;
ofm_on = false; ofm_level = OFM_NOLEVEL; lf = 0; lh = 0;
nco = 0; ncw = 0; npc = 0;
@@ -139,7 +139,7 @@ ofm_organize(void)
case OFM_TFM: { start_pos = 2; check_sum_pos = 24; break; }
case OFM_LEVEL0: { start_pos = 8; check_sum_pos = 56; break; }
case OFM_LEVEL1: { start_pos = 8; check_sum_pos = 116; break; }
- default: { fatal_error_1("OFMLEVEL %d not supported", ofm_level-1);
+ default: { fatal_error_1("OFMLEVEL %d not supported", ofm_level-OFM_LEVEL0);
break; }
}
design_size_pos = check_sum_pos+4;
@@ -281,24 +281,38 @@ ofm_organize(void)
break;
}
case OFM_LEVEL1: {
- char_ptr = 4*char_base;
+ char_start = 4*char_base;
i = bc;
while (i<=ec) {
init_character(i,NULL);
- copies = 1+256*ofm[char_ptr+8]+ofm[char_ptr+9];
- for (j=1; j<=copies; j++) {
- char_start = char_ptr;
- i++;
- }
- char_ptr = char_ptr + bytes_per_entry;
+ current_character->index_indices[C_WD] =
+ ((ofm[char_start] & 0xff) << 8) |
+ (ofm[char_start+1] & 0xff);
+ current_character->index_indices[C_HT] =
+ ofm[char_start+2] & 0xff;
+ current_character->index_indices[C_DP] =
+ ofm[char_start+3] & 0xff;
+ current_character->index_indices[C_IC] =
+ ofm[char_start+4] & 0xff;
+ current_character->tag =
+ ofm[char_start+5] & 0x3;
+ if (current_character->tag == TAG_LIG) no_labels++;
+ current_character->remainder =
+ ((ofm[char_start+6] & 0xff) << 8) |
+ (ofm[char_start+7] & 0xff);
+ copies = 256*ofm[char_start+8]+ofm[char_start+9];
+ /* Handle character params */
+ copy_characters(i, copies);
+ i += copies + 1;
+ char_start += bytes_per_entry;
}
- if (char_ptr != (4*(char_base+ncw)))
+ if (char_start != (4*(char_base+ncw)))
fatal_error_0("Length of char info table does not "
"correspond to specification");
break;
}
default: {
- fatal_error_1("Inappropriate font level (%d)", ofm_level-1);
+ fatal_error_1("Inappropriate font level (%d)", ofm_level-OFM_LEVEL0);
}
}
width_base = char_base+ncw;
@@ -306,17 +320,9 @@ ofm_organize(void)
depth_base = height_base+nh;
italic_base = depth_base+nd;
lig_kern_base = italic_base+ni;
- if (ofm_level==OFM_TFM) {
- kern_base = lig_kern_base+nl;
- } else {
- kern_base = lig_kern_base+2*nl;
- }
+ kern_base = lig_kern_base+ncl;
exten_base = kern_base+nk;
- if (ofm_level==OFM_TFM) {
- param_base = exten_base+ne-1;
- } else {
- param_base = exten_base+2*ne-1;
- }
+ param_base = exten_base+nce-1;
}
void
diff --git a/Build/source/texk/web2c/omegafonts/parser.h b/Build/source/texk/web2c/omegafonts/parser.h
index c5ff2cae708..056a891b6e7 100644
--- a/Build/source/texk/web2c/omegafonts/parser.h
+++ b/Build/source/texk/web2c/omegafonts/parser.h
@@ -28,7 +28,6 @@ typedef union {
char *ystring ;
} yystype;
-extern YYSTYPE yylval;
extern int line_number;
extern FILE *yyin;
extern int yylex(void);
diff --git a/Build/source/texk/web2c/omegafonts/pl-parser.c b/Build/source/texk/web2c/omegafonts/pl-parser.c
index 4f0dadc9259..0b94d5ce52b 100644
--- a/Build/source/texk/web2c/omegafonts/pl-parser.c
+++ b/Build/source/texk/web2c/omegafonts/pl-parser.c
@@ -95,6 +95,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#include "cpascal.h"
#include "parser.h"
+#include "pl-parser.h"
#include "manifests.h"
#include "list_routines.h"
#include "error_routines.h"
@@ -111,7 +112,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
/* Line 189 of yacc.c */
-#line 115 "pl-parser.c"
+#line 116 "pl-parser.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -323,7 +324,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 327 "pl-parser.c"
+#line 328 "pl-parser.c"
#ifdef short
# undef short
@@ -672,22 +673,22 @@ static const yytype_int16 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 155, 155, 158, 160, 168, 170, 172, 174, 176,
- 178, 180, 182, 185, 184, 188, 187, 190, 193, 192,
- 195, 199, 202, 201, 207, 209, 212, 211, 216, 215,
- 219, 218, 222, 221, 225, 224, 228, 227, 231, 230,
- 235, 237, 242, 244, 246, 249, 251, 256, 258, 260,
- 262, 264, 266, 268, 272, 274, 276, 278, 280, 284,
- 286, 291, 293, 296, 295, 298, 303, 302, 309, 311,
- 313, 315, 317, 319, 321, 326, 328, 333, 335, 341,
- 343, 348, 350, 352, 354, 356, 358, 361, 363, 368,
- 370, 372, 374, 376, 378, 380, 382, 388, 390, 396,
- 395, 398, 401, 403, 408, 410, 413, 415, 421, 420,
- 423, 426, 428, 433, 435, 438, 440, 446, 445, 448,
- 451, 453, 458, 460, 463, 465, 471, 470, 473, 476,
- 478, 483, 485, 488, 490, 496, 495, 498, 501, 503,
- 508, 510, 513, 515, 521, 520, 523, 526, 528, 533,
- 535, 537, 539, 541, 543
+ 0, 156, 156, 159, 161, 169, 171, 173, 175, 177,
+ 179, 181, 183, 186, 185, 189, 188, 191, 194, 193,
+ 196, 200, 203, 202, 208, 210, 213, 212, 217, 216,
+ 220, 219, 223, 222, 226, 225, 229, 228, 232, 231,
+ 236, 238, 243, 245, 247, 250, 252, 257, 259, 261,
+ 263, 265, 267, 269, 273, 275, 277, 279, 281, 285,
+ 287, 292, 294, 297, 296, 299, 304, 303, 310, 312,
+ 314, 316, 318, 320, 322, 327, 329, 334, 336, 342,
+ 344, 349, 351, 353, 355, 357, 359, 362, 364, 369,
+ 371, 373, 375, 377, 379, 381, 383, 389, 391, 397,
+ 396, 399, 402, 404, 409, 411, 414, 416, 422, 421,
+ 424, 427, 429, 434, 436, 439, 441, 447, 446, 449,
+ 452, 454, 459, 461, 464, 466, 472, 471, 474, 477,
+ 479, 484, 486, 489, 491, 497, 496, 499, 502, 504,
+ 509, 511, 514, 516, 522, 521, 524, 527, 529, 534,
+ 536, 538, 540, 542, 544
};
#endif
@@ -1783,560 +1784,560 @@ yyreduce:
case 5:
/* Line 1455 of yacc.c */
-#line 169 "pl-parser.y"
+#line 170 "pl-parser.y"
{ set_check_sum((yyvsp[(2) - (2)]).yint); }
break;
case 6:
/* Line 1455 of yacc.c */
-#line 171 "pl-parser.y"
+#line 172 "pl-parser.y"
{ set_design_size((yyvsp[(2) - (2)]).yfix); }
break;
case 7:
/* Line 1455 of yacc.c */
-#line 173 "pl-parser.y"
+#line 174 "pl-parser.y"
{ set_design_units((yyvsp[(2) - (2)]).yfix); }
break;
case 8:
/* Line 1455 of yacc.c */
-#line 175 "pl-parser.y"
+#line 176 "pl-parser.y"
{ set_coding_scheme((yyvsp[(1) - (1)]).ystring); }
break;
case 9:
/* Line 1455 of yacc.c */
-#line 177 "pl-parser.y"
+#line 178 "pl-parser.y"
{ set_family((yyvsp[(1) - (1)]).ystring); }
break;
case 10:
/* Line 1455 of yacc.c */
-#line 179 "pl-parser.y"
+#line 180 "pl-parser.y"
{ set_face((yyvsp[(2) - (2)]).yint); }
break;
case 11:
/* Line 1455 of yacc.c */
-#line 181 "pl-parser.y"
+#line 182 "pl-parser.y"
{ set_seven_bit_safe_flag((yyvsp[(1) - (1)]).yint); }
break;
case 12:
/* Line 1455 of yacc.c */
-#line 183 "pl-parser.y"
+#line 184 "pl-parser.y"
{ set_header_word((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 13:
/* Line 1455 of yacc.c */
-#line 185 "pl-parser.y"
+#line 186 "pl-parser.y"
{ init_parameters(); }
break;
case 15:
/* Line 1455 of yacc.c */
-#line 188 "pl-parser.y"
+#line 189 "pl-parser.y"
{ init_ligkern(); }
break;
case 17:
/* Line 1455 of yacc.c */
-#line 191 "pl-parser.y"
+#line 192 "pl-parser.y"
{ set_boundary_character((yyvsp[(2) - (2)]).yint); }
break;
case 18:
/* Line 1455 of yacc.c */
-#line 193 "pl-parser.y"
+#line 194 "pl-parser.y"
{ init_character((yyvsp[(2) - (2)]).yint, NULL); }
break;
case 21:
/* Line 1455 of yacc.c */
-#line 200 "pl-parser.y"
+#line 201 "pl-parser.y"
{ set_vtitle((yyvsp[(1) - (1)]).ystring); }
break;
case 22:
/* Line 1455 of yacc.c */
-#line 202 "pl-parser.y"
+#line 203 "pl-parser.y"
{ init_map_font((yyvsp[(2) - (2)]).yint); }
break;
case 24:
/* Line 1455 of yacc.c */
-#line 208 "pl-parser.y"
+#line 209 "pl-parser.y"
{ set_ofm_level((yyvsp[(2) - (2)]).yint); }
break;
case 25:
/* Line 1455 of yacc.c */
-#line 210 "pl-parser.y"
+#line 211 "pl-parser.y"
{ set_font_dir((yyvsp[(1) - (1)]).yint); }
break;
case 26:
/* Line 1455 of yacc.c */
-#line 212 "pl-parser.y"
+#line 213 "pl-parser.y"
{ init_character((yyvsp[(2) - (3)]).yint,NULL); }
break;
case 27:
/* Line 1455 of yacc.c */
-#line 214 "pl-parser.y"
+#line 215 "pl-parser.y"
{ copy_characters((yyvsp[(2) - (5)]).yint,(yyvsp[(3) - (5)]).yint); }
break;
case 28:
/* Line 1455 of yacc.c */
-#line 216 "pl-parser.y"
+#line 217 "pl-parser.y"
{init_font_ivalue((yyvsp[(2) - (2)]).yint);}
break;
case 30:
/* Line 1455 of yacc.c */
-#line 219 "pl-parser.y"
+#line 220 "pl-parser.y"
{ init_font_mvalue((yyvsp[(2) - (2)]).yint);}
break;
case 32:
/* Line 1455 of yacc.c */
-#line 222 "pl-parser.y"
+#line 223 "pl-parser.y"
{ init_font_fvalue((yyvsp[(2) - (2)]).yint);}
break;
case 34:
/* Line 1455 of yacc.c */
-#line 225 "pl-parser.y"
+#line 226 "pl-parser.y"
{ init_font_penalty((yyvsp[(2) - (2)]).yint);}
break;
case 36:
/* Line 1455 of yacc.c */
-#line 228 "pl-parser.y"
+#line 229 "pl-parser.y"
{ init_font_rule((yyvsp[(2) - (2)]).yint);}
break;
case 38:
/* Line 1455 of yacc.c */
-#line 231 "pl-parser.y"
+#line 232 "pl-parser.y"
{ init_font_glue((yyvsp[(2) - (2)]).yint);}
break;
case 42:
/* Line 1455 of yacc.c */
-#line 243 "pl-parser.y"
+#line 244 "pl-parser.y"
{ set_param_word((yyvsp[(1) - (2)]).yint, (yyvsp[(2) - (2)]).yfix); }
break;
case 43:
/* Line 1455 of yacc.c */
-#line 245 "pl-parser.y"
+#line 246 "pl-parser.y"
{ set_param_word((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yfix); }
break;
case 47:
/* Line 1455 of yacc.c */
-#line 257 "pl-parser.y"
+#line 258 "pl-parser.y"
{ set_label_command((yyvsp[(2) - (2)]).yint); }
break;
case 48:
/* Line 1455 of yacc.c */
-#line 259 "pl-parser.y"
+#line 260 "pl-parser.y"
{ set_label_command(CHAR_BOUNDARY); }
break;
case 49:
/* Line 1455 of yacc.c */
-#line 261 "pl-parser.y"
+#line 262 "pl-parser.y"
{ set_ligature_command((yyvsp[(1) - (3)]).yint, (yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 50:
/* Line 1455 of yacc.c */
-#line 263 "pl-parser.y"
+#line 264 "pl-parser.y"
{ set_kerning_command((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yfix); }
break;
case 51:
/* Line 1455 of yacc.c */
-#line 265 "pl-parser.y"
+#line 266 "pl-parser.y"
{ set_stop_command(); }
break;
case 52:
/* Line 1455 of yacc.c */
-#line 267 "pl-parser.y"
+#line 268 "pl-parser.y"
{ set_skip_command((yyvsp[(2) - (2)]).yint); }
break;
case 54:
/* Line 1455 of yacc.c */
-#line 273 "pl-parser.y"
+#line 274 "pl-parser.y"
{ set_c_label_command((yyvsp[(2) - (2)]).yint); }
break;
case 55:
/* Line 1455 of yacc.c */
-#line 275 "pl-parser.y"
+#line 276 "pl-parser.y"
{ set_c_kerning_command((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yfix); }
break;
case 56:
/* Line 1455 of yacc.c */
-#line 277 "pl-parser.y"
+#line 278 "pl-parser.y"
{ set_c_glue_command((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 57:
/* Line 1455 of yacc.c */
-#line 279 "pl-parser.y"
+#line 280 "pl-parser.y"
{ set_c_penalty_command((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 58:
/* Line 1455 of yacc.c */
-#line 281 "pl-parser.y"
+#line 282 "pl-parser.y"
{ set_c_penglue_command((yyvsp[(2) - (4)]).yint, (yyvsp[(3) - (4)]).yint, (yyvsp[(4) - (4)]).yint); }
break;
case 61:
/* Line 1455 of yacc.c */
-#line 292 "pl-parser.y"
+#line 293 "pl-parser.y"
{ set_character_measure((yyvsp[(1) - (2)]).yint, (yyvsp[(2) - (2)]).yfix); }
break;
case 62:
/* Line 1455 of yacc.c */
-#line 294 "pl-parser.y"
+#line 295 "pl-parser.y"
{ set_next_larger((yyvsp[(2) - (2)]).yint); }
break;
case 63:
/* Line 1455 of yacc.c */
-#line 296 "pl-parser.y"
+#line 297 "pl-parser.y"
{ init_var_character(); }
break;
case 66:
/* Line 1455 of yacc.c */
-#line 303 "pl-parser.y"
+#line 304 "pl-parser.y"
{ init_map(); }
break;
case 67:
/* Line 1455 of yacc.c */
-#line 305 "pl-parser.y"
+#line 306 "pl-parser.y"
{ end_map(); }
break;
case 68:
/* Line 1455 of yacc.c */
-#line 310 "pl-parser.y"
+#line 311 "pl-parser.y"
{ set_accent((yyvsp[(1) - (1)]).yint); }
break;
case 69:
/* Line 1455 of yacc.c */
-#line 312 "pl-parser.y"
+#line 313 "pl-parser.y"
{ set_character_ivalue((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 70:
/* Line 1455 of yacc.c */
-#line 314 "pl-parser.y"
+#line 315 "pl-parser.y"
{ set_character_mvalue((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 71:
/* Line 1455 of yacc.c */
-#line 316 "pl-parser.y"
+#line 317 "pl-parser.y"
{ set_character_fvalue((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 72:
/* Line 1455 of yacc.c */
-#line 318 "pl-parser.y"
+#line 319 "pl-parser.y"
{ set_character_penalty((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 73:
/* Line 1455 of yacc.c */
-#line 320 "pl-parser.y"
+#line 321 "pl-parser.y"
{ set_character_rule((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 74:
/* Line 1455 of yacc.c */
-#line 322 "pl-parser.y"
+#line 323 "pl-parser.y"
{ set_character_glue((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 77:
/* Line 1455 of yacc.c */
-#line 334 "pl-parser.y"
+#line 335 "pl-parser.y"
{ set_extensible_piece((yyvsp[(1) - (2)]).yint, (yyvsp[(2) - (2)]).yint); }
break;
case 81:
/* Line 1455 of yacc.c */
-#line 349 "pl-parser.y"
+#line 350 "pl-parser.y"
{ set_font_name((yyvsp[(1) - (1)]).ystring); }
break;
case 82:
/* Line 1455 of yacc.c */
-#line 351 "pl-parser.y"
+#line 352 "pl-parser.y"
{ set_font_area((yyvsp[(1) - (1)]).ystring); }
break;
case 83:
/* Line 1455 of yacc.c */
-#line 353 "pl-parser.y"
+#line 354 "pl-parser.y"
{ set_font_check_sum((yyvsp[(2) - (2)]).yint); }
break;
case 84:
/* Line 1455 of yacc.c */
-#line 355 "pl-parser.y"
+#line 356 "pl-parser.y"
{ set_font_at((yyvsp[(2) - (2)]).yfix); }
break;
case 85:
/* Line 1455 of yacc.c */
-#line 357 "pl-parser.y"
+#line 358 "pl-parser.y"
{ set_font_design_size((yyvsp[(2) - (2)]).yfix); }
break;
case 89:
/* Line 1455 of yacc.c */
-#line 369 "pl-parser.y"
+#line 370 "pl-parser.y"
{ set_select_font((yyvsp[(2) - (2)]).yint); }
break;
case 90:
/* Line 1455 of yacc.c */
-#line 371 "pl-parser.y"
+#line 372 "pl-parser.y"
{ set_set_char((yyvsp[(2) - (2)]).yint); }
break;
case 91:
/* Line 1455 of yacc.c */
-#line 373 "pl-parser.y"
+#line 374 "pl-parser.y"
{ set_set_rule((yyvsp[(2) - (3)]).yfix, (yyvsp[(3) - (3)]).yfix); }
break;
case 92:
/* Line 1455 of yacc.c */
-#line 375 "pl-parser.y"
+#line 376 "pl-parser.y"
{ set_move((yyvsp[(1) - (2)]).yint, (yyvsp[(2) - (2)]).yfix); }
break;
case 93:
/* Line 1455 of yacc.c */
-#line 377 "pl-parser.y"
+#line 378 "pl-parser.y"
{ set_push(); }
break;
case 94:
/* Line 1455 of yacc.c */
-#line 379 "pl-parser.y"
+#line 380 "pl-parser.y"
{ set_pop(); }
break;
case 95:
/* Line 1455 of yacc.c */
-#line 381 "pl-parser.y"
+#line 382 "pl-parser.y"
{ set_special((yyvsp[(1) - (1)]).ystring); }
break;
case 96:
/* Line 1455 of yacc.c */
-#line 383 "pl-parser.y"
+#line 384 "pl-parser.y"
{ set_special_hex((yyvsp[(1) - (1)]).ystring); }
break;
case 99:
/* Line 1455 of yacc.c */
-#line 396 "pl-parser.y"
+#line 397 "pl-parser.y"
{ init_font_ivalue_entry((yyvsp[(2) - (2)]).yint); }
break;
case 104:
/* Line 1455 of yacc.c */
-#line 409 "pl-parser.y"
+#line 410 "pl-parser.y"
{ set_font_ivalue_definition((yyvsp[(2) - (2)]).yint); }
break;
case 108:
/* Line 1455 of yacc.c */
-#line 421 "pl-parser.y"
+#line 422 "pl-parser.y"
{ init_font_mvalue_entry((yyvsp[(2) - (2)]).yint); }
break;
case 113:
/* Line 1455 of yacc.c */
-#line 434 "pl-parser.y"
+#line 435 "pl-parser.y"
{ set_font_mvalue_definition((yyvsp[(2) - (2)]).yfix); }
break;
case 117:
/* Line 1455 of yacc.c */
-#line 446 "pl-parser.y"
+#line 447 "pl-parser.y"
{ init_font_fvalue_entry((yyvsp[(2) - (2)]).yint); }
break;
case 122:
/* Line 1455 of yacc.c */
-#line 459 "pl-parser.y"
+#line 460 "pl-parser.y"
{ set_font_fvalue_definition((yyvsp[(2) - (2)]).yfix); }
break;
case 126:
/* Line 1455 of yacc.c */
-#line 471 "pl-parser.y"
+#line 472 "pl-parser.y"
{ init_font_penalty_entry((yyvsp[(2) - (2)]).yint); }
break;
case 131:
/* Line 1455 of yacc.c */
-#line 484 "pl-parser.y"
+#line 485 "pl-parser.y"
{ set_font_penalty_definition((yyvsp[(2) - (2)]).yint); }
break;
case 135:
/* Line 1455 of yacc.c */
-#line 496 "pl-parser.y"
+#line 497 "pl-parser.y"
{ init_font_rule_entry((yyvsp[(2) - (2)]).yint); }
break;
case 140:
/* Line 1455 of yacc.c */
-#line 509 "pl-parser.y"
+#line 510 "pl-parser.y"
{ set_font_rule_measure((yyvsp[(1) - (2)]).yint, (yyvsp[(2) - (2)]).yfix); }
break;
case 144:
/* Line 1455 of yacc.c */
-#line 521 "pl-parser.y"
+#line 522 "pl-parser.y"
{ init_font_glue_entry((yyvsp[(2) - (2)]).yint); }
break;
case 149:
/* Line 1455 of yacc.c */
-#line 534 "pl-parser.y"
+#line 535 "pl-parser.y"
{ set_font_glue_type((yyvsp[(2) - (2)]).yint); }
break;
case 150:
/* Line 1455 of yacc.c */
-#line 536 "pl-parser.y"
+#line 537 "pl-parser.y"
{ set_font_glue_width((yyvsp[(2) - (2)]).yfix); }
break;
case 151:
/* Line 1455 of yacc.c */
-#line 538 "pl-parser.y"
+#line 539 "pl-parser.y"
{ set_font_glue_character((yyvsp[(2) - (2)]).yint); }
break;
case 152:
/* Line 1455 of yacc.c */
-#line 540 "pl-parser.y"
+#line 541 "pl-parser.y"
{ set_font_glue_rule((yyvsp[(2) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 153:
/* Line 1455 of yacc.c */
-#line 542 "pl-parser.y"
+#line 543 "pl-parser.y"
{ set_font_glue_shrink_stretch((yyvsp[(1) - (3)]).yint, (yyvsp[(2) - (3)]).yfix, (yyvsp[(3) - (3)]).yint); }
break;
/* Line 1455 of yacc.c */
-#line 2340 "pl-parser.c"
+#line 2341 "pl-parser.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/Build/source/texk/web2c/omegafonts/pl-parser.y b/Build/source/texk/web2c/omegafonts/pl-parser.y
index 9011a50528a..2ce71297043 100644
--- a/Build/source/texk/web2c/omegafonts/pl-parser.y
+++ b/Build/source/texk/web2c/omegafonts/pl-parser.y
@@ -24,6 +24,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#include "cpascal.h"
#include "parser.h"
+#include "pl-parser.h"
#include "manifests.h"
#include "list_routines.h"
#include "error_routines.h"
diff --git a/Build/source/texk/web2c/omegafonts/repeat.test b/Build/source/texk/web2c/omegafonts/repeat.test
new file mode 100755
index 00000000000..9af4db462bc
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/repeat.test
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+test -d tests || mkdir -p tests
+
+./omfonts -opl2ofm -verbose $srcdir/tests/repeat tests/xrepeated || exit 1
+
+TEXMFCNF=$srcdir/../../kpathsea \
+ ./omfonts -ofm2opl -verbose tests/xrepeated tests/xrepeated || exit 1
+
+diff $srcdir/tests/repeated.opl tests/xrepeated.opl || exit 1
+
diff --git a/Build/source/texk/web2c/omegafonts/tests/level1.opl b/Build/source/texk/web2c/omegafonts/tests/level1.opl
new file mode 100644
index 00000000000..2a700e7ada0
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/level1.opl
@@ -0,0 +1,39 @@
+(OFMLEVEL D 1)
+(FONTDIR TL)
+(FAMILY UNSPECIFIED)
+(FACE F MRR)
+(CODINGSCHEME UNICODE)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM H 0)
+(SEVENBITSAFEFLAG FALSE)
+(FONTDIMEN
+ (SLANT R 0.0)
+ (SPACE R 0.0)
+ (STRETCH R 0.0)
+ (SHRINK R 0.0)
+ (XHEIGHT R 1.0)
+ (QUAD R 1.0)
+ (EXTRASPACE R 0.0)
+ )
+(COMMENT
+ (CHARWD_ENTRY D 0 R 0.0)
+ (CHARWD_ENTRY D 1 R 1.0)
+ )
+(COMMENT
+ (CHARHT_ENTRY D 0 R 0.0)
+ (CHARHT_ENTRY D 1 R 0.9)
+ )
+(COMMENT
+ (CHARDP_ENTRY D 0 R 0.0)
+ (CHARDP_ENTRY D 1 R 0.1)
+ )
+(COMMENT
+ (CHARIC_ENTRY D 0 R 0.0)
+ )
+(CHARREPEAT H 1 H FFFE
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
diff --git a/Build/source/texk/web2c/omegafonts/tests/repeat.opl b/Build/source/texk/web2c/omegafonts/tests/repeat.opl
new file mode 100644
index 00000000000..8cf09282d2f
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/repeat.opl
@@ -0,0 +1,93 @@
+(OFMLEVEL H 1)
+(FONTDIR TL)
+(FAMILY UNSPECIFIED)
+(FACE F MRR)
+(CODINGSCHEME UNICODE)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM H 0)
+(SEVENBITSAFEFLAG FALSE)
+(FONTDIMEN
+ (SLANT R 0.0)
+ (SPACE R 0.0)
+ (STRETCH R 0.0)
+ (SHRINK R 0.0)
+ (XHEIGHT R 1.0)
+ (QUAD R 1.0)
+ (EXTRASPACE R 0.0)
+ )
+(COMMENT
+ (CHARWD_ENTRY D 0 R 0.0)
+ (CHARWD_ENTRY D 1 R 1.0)
+ )
+(COMMENT
+ (CHARHT_ENTRY D 0 R 0.0)
+ (CHARHT_ENTRY D 1 R 0.9)
+ )
+(COMMENT
+ (CHARDP_ENTRY D 0 R 0.0)
+ (CHARDP_ENTRY D 1 R 0.1)
+ )
+(COMMENT
+ (CHARIC_ENTRY D 0 R 0.0)
+ )
+(CHARREPEAT H 1 H 0
+ (COMMENT Repeat count zero)
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 11 H 1
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 13 H 1
+ (COMMENT Merge with previous)
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 16 H 1
+ (COMMENT No merge after gap)
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARACTER H 18
+ (COMMENT Merge with previous)
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARACTER H 1A
+ (COMMENT No merge after gap)
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 1B H 1
+ (COMMENT Merge with previous)
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARACTER H 1E
+ (COMMENT No merge after gap)
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARACTER H 1F
+ (COMMENT Merge with previous)
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 21 H 1
+ (COMMENT No merge after gap)
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
diff --git a/Build/source/texk/web2c/omegafonts/tests/repeated.opl b/Build/source/texk/web2c/omegafonts/tests/repeated.opl
new file mode 100644
index 00000000000..0af312624cd
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/repeated.opl
@@ -0,0 +1,84 @@
+(OFMLEVEL D 1)
+(FONTDIR TL)
+(FAMILY UNSPECIFIED)
+(FACE F MRR)
+(CODINGSCHEME UNICODE)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM H 0)
+(SEVENBITSAFEFLAG FALSE)
+(FONTDIMEN
+ (SLANT R 0.0)
+ (SPACE R 0.0)
+ (STRETCH R 0.0)
+ (SHRINK R 0.0)
+ (XHEIGHT R 1.0)
+ (QUAD R 1.0)
+ (EXTRASPACE R 0.0)
+ )
+(COMMENT
+ (CHARWD_ENTRY D 0 R 0.0)
+ (CHARWD_ENTRY D 1 R 1.0)
+ )
+(COMMENT
+ (CHARHT_ENTRY D 0 R 0.0)
+ (CHARHT_ENTRY D 1 R 0.9)
+ )
+(COMMENT
+ (CHARDP_ENTRY D 0 R 0.0)
+ (CHARDP_ENTRY D 1 R 0.1)
+ )
+(COMMENT
+ (CHARIC_ENTRY D 0 R 0.0)
+ )
+(CHARACTER H 1
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 11 H 1
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 13 H 1
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 16 H 1
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARACTER H 18
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARACTER H 1A
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 1B H 1
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARACTER H 1E
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARACTER H 1F
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )
+(CHARREPEAT H 21 H 1
+ (CHARWD R 1.0)
+ (CHARHT R 0.9)
+ (CHARDP R 0.1)
+ )