113
113
type_tcb(ptcb); /* Reclassify transformation types */
116
FUNCTION ufix8 FONTFAR *skip_interpolation_table(
118
ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */
119
ufix8 format) /* Character format byte */
134
n = ((format & BIT6)? (fix15)NEXT_BYTE(pointer): 0);
135
n += ((format & BIT7)? (fix15)NEXT_BYTE(pointer): 0);
136
for (i = 0; i < n; i++) /* For each entry in int table ... */
138
format = NEXT_BYTE(pointer); /* Read format byte */
139
if (format & BIT7) /* Short Start/End point spec? */
141
pointer++; /* Skip Start/End point byte */
145
pointer += intsize[format & 0x7]; /* Skip Start point spec */
146
pointer += intsize[(format >> 3) & 0x7]; /* Skip End point spec */
151
FUNCTION ufix8 FONTFAR *skip_control_zone(
153
ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */
154
ufix8 format) /* Character format byte */
159
n = sp_globals.no_X_orus + sp_globals.no_Y_orus - 2;
160
for (i = 0; i < n; i++) /* For each entry in control table ... */
163
pointer++; /* Skip short form From/To fields */
165
pointer += 2; /* Skip FROM and TO fields */
166
/* skip constraints field */
167
NEXT_BYTES (pointer, tmpufix16);
175
FUNCTION ufix8 FONTFAR *plaid_tcb(
117
static FUNCTION ufix8 FONTFAR *read_oru_table(
177
ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */
178
ufix8 format) /* Character format byte */
180
* Called by make_simp_char() and make_comp_char() to set up the controlled
181
* coordinate table and skip all other intelligent scaling rules embedded
182
* in the character data.
183
* Updates pointer to first byte after plaid data.
184
* This is used only if intelligent scaling is not supported in the
185
* configuration definitions.
119
ufix8 FONTFAR *pointer) /* Pointer to first byte in controlled coord table */
121
* Called by plaid_tcb() to read the controlled coordinate table from the
122
* character data in the font.
123
* Updates the pointer to the byte following the controlled coordinate
192
sp_globals.no_X_orus = (format & BIT2)?
193
(fix15)NEXT_BYTE(pointer):
195
sp_globals.no_Y_orus = (format & BIT3)?
196
(fix15)NEXT_BYTE(pointer):
198
pointer = read_oru_table(pointer); /* Updates no_X/Y/orus */
199
sp_globals.Y_edge_org = sp_globals.no_X_orus;
201
/* Skip over control zone table */
202
pointer = skip_control_zone(pointer,format);
204
/* Skip over interpolation table */
205
pointer = skip_interpolation_table(pointer,format);
135
n = sp_globals.no_X_orus;
136
pos = sp_globals.tcb.xpos;
141
for (k = 0; k < n; k++)
143
oru = NEXT_WORD(pointer);
144
if (zero_not_in && (oru >= 0)) /* First positive oru value? */
146
sp_plaid.pix[i] = pos; /* Insert position in pix array */
147
if (oru != 0) /* Zero oru value omitted? */
149
sp_plaid.orus[i++] = 0; /* Insert zero value in oru array */
150
zero_added = TRUE; /* Remember to increment size of array */
152
zero_not_in = FALSE; /* Inhibit further testing for zero ins */
154
sp_plaid.orus[i++] = oru; /* Add specified oru value to array */
156
if (zero_not_in) /* All specified oru values negative? */
158
sp_plaid.pix[i] = pos; /* Insert position in pix array */
159
sp_plaid.orus[i++] = 0; /* Add zero oru value */
160
zero_added = TRUE; /* Remember to increment size of array */
162
if (j) /* Both X and Y orus read? */
165
sp_globals.no_X_orus++; /* Increment X array size */
166
n = sp_globals.no_Y_orus; /* Prepare to read Y oru values */
167
pos = sp_globals.tcb.ypos;
169
if (zero_added) /* Zero Y oru value added to array? */
170
sp_globals.no_Y_orus++; /* Increment Y array size */
173
printf("\nX ORUS\n");
174
n = sp_globals.no_X_orus;
175
for (i = 0; i < n; i++)
177
printf("%2d %4d\n", i, sp_plaid.orus[i]);
179
printf("\nY ORUS\n");
180
n = sp_globals.no_Y_orus;
181
for (i = 0; i < n; i++)
183
printf("%2d %4d\n", i, sp_plaid.orus[i + sp_globals.no_X_orus]);
187
return pointer; /* Update pointer */
211
190
FUNCTION ufix8 FONTFAR *plaid_tcb(
213
192
ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */
442
FUNCTION ufix8 FONTFAR *read_oru_table(
444
ufix8 FONTFAR *pointer) /* Pointer to first byte in controlled coord table */
446
* Called by plaid_tcb() to read the controlled coordinate table from the
447
* character data in the font.
448
* Updates the pointer to the byte following the controlled coordinate
462
n = sp_globals.no_X_orus;
464
pos = sp_globals.tcb.xpos;
470
for (k = 0; k < n; k++)
472
oru = NEXT_WORD(pointer);
473
if (zero_not_in && (oru >= 0)) /* First positive oru value? */
476
sp_plaid.pix[i] = pos; /* Insert position in pix array */
478
if (oru != 0) /* Zero oru value omitted? */
480
sp_plaid.orus[i++] = 0; /* Insert zero value in oru array */
481
zero_added = TRUE; /* Remember to increment size of array */
483
zero_not_in = FALSE; /* Inhibit further testing for zero ins */
485
sp_plaid.orus[i++] = oru; /* Add specified oru value to array */
487
if (zero_not_in) /* All specified oru values negative? */
490
sp_plaid.pix[i] = pos; /* Insert position in pix array */
492
sp_plaid.orus[i++] = 0; /* Add zero oru value */
493
zero_added = TRUE; /* Remember to increment size of array */
495
if (j) /* Both X and Y orus read? */
498
sp_globals.no_X_orus++; /* Increment X array size */
499
n = sp_globals.no_Y_orus; /* Prepare to read Y oru values */
501
pos = sp_globals.tcb.ypos;
504
if (zero_added) /* Zero Y oru value added to array? */
505
sp_globals.no_Y_orus++; /* Increment Y array size */
508
printf("\nX ORUS\n");
509
n = sp_globals.no_X_orus;
510
for (i = 0; i < n; i++)
512
printf("%2d %4d\n", i, sp_plaid.orus[i]);
514
printf("\nY ORUS\n");
515
n = sp_globals.no_Y_orus;
516
for (i = 0; i < n; i++)
518
printf("%2d %4d\n", i, sp_plaid.orus[i + sp_globals.no_X_orus]);
522
return pointer; /* Update pointer */
524
418
#if INCL_SQUEEZING || INCL_ISW
525
419
FUNCTION static void calculate_x_pix(