summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mplibdir/tfmin.w
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/mplibdir/tfmin.w')
-rw-r--r--Build/source/texk/web2c/mplibdir/tfmin.w21
1 files changed, 11 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/mplibdir/tfmin.w b/Build/source/texk/web2c/mplibdir/tfmin.w
index 8df443db664..56216fb4591 100644
--- a/Build/source/texk/web2c/mplibdir/tfmin.w
+++ b/Build/source/texk/web2c/mplibdir/tfmin.w
@@ -49,15 +49,16 @@
#include <string.h>
#include "mplib.h"
#include "mpmp.h" /* internal header */
-#include "mptfmin.h" /* internal header */
+#include "mpmath.h" /* internal header */
+@<Declarations@>;
@h
@ The |font_ps_name| for a built-in font should be what PostScript expects.
A preliminary name is obtained here from the \.{TFM} name as given in the
|fname| argument. This gets updated later from an external table if necessary.
-@(mptfmin.h@>=
-extern font_number mp_read_font_info (MP mp, char *fname);
+@<Declarations@>=
+font_number mp_read_font_info (MP mp, char *fname);
@ @c
font_number mp_read_font_info (MP mp, char *fname) {
@@ -67,7 +68,7 @@ font_number mp_read_font_info (MP mp, char *fname) {
size_t whd_size; /* words needed for heights, widths, and depths */
int i,ii; /* |font_info| indices */
int jj; /* counts bytes to be ignored */
- scaled z; /* used to compute the design size */
+ int z; /* used to compute the design size */
fraction d; /* height, width, or depth as a fraction of design size times $2^{-8}$ */
int h_and_d; /* height and depth indices being unpacked */
int tfbyte = 0; /* a byte read from the file */
@@ -158,10 +159,10 @@ if (mp->last_fnum==mp->font_max)
mp_reallocate_fonts(mp,(mp->font_max+(mp->font_max/4)));
while (mp->next_fmem+whd_size>=mp->font_mem_size) {
size_t l = mp->font_mem_size+(mp->font_mem_size/4);
- memory_word *font_info;
- font_info = mp_xmalloc (mp,(l+1),sizeof(memory_word));
- memset (font_info,0,sizeof(memory_word)*(l+1));
- memcpy (font_info,mp->font_info,sizeof(memory_word)*(mp->font_mem_size+1));
+ font_data *font_info;
+ font_info = mp_xmalloc (mp,(l+1),sizeof(font_data));
+ memset (font_info,0,sizeof(font_data)*(l+1));
+ memcpy (font_info,mp->font_info,sizeof(font_data)*(mp->font_mem_size+1));
mp_xfree(mp->font_info);
mp->font_info = font_info;
mp->font_mem_size = l;
@@ -183,7 +184,7 @@ tf_ignore(4);
tfget; read_two(z);
tfget; z=z*0400+tfbyte;
tfget; z=z*0400+tfbyte; /* now |z| is 16 times the design size */
-mp->font_dsize[n]=mp_take_fraction(mp, z,267432584);
+mp->font_dsize[n]=mp_take_fraction(mp, z,integer_as_fraction(267432584));
/* times ${72\over72.27}2^{28}$ to convert from \TeX\ points */
tf_ignore(4*(tfm_lh-2))
@@ -217,7 +218,7 @@ if ( d>=0200 ) d=d-0400;
tfget; d=d*0400+tfbyte;
tfget; d=d*0400+tfbyte;
tfget; d=d*0400+tfbyte;
-mp->font_info[i].cint=mp_take_fraction(mp, d*16,mp->font_dsize[n]);
+mp->font_info[i].sc=mp_take_fraction(mp, d*16,integer_as_fraction(mp->font_dsize[n]));
i++;
}