/*
trf-nwid.c - routine to try to figure out the width of an en
in the current point size. This is used by the table writing
code in an attempt to get cells the right width.
If you're trying to figure out widths for another version of
troff, run nwidth.trf through it and look at the result.
*/
# include <stdio.h>
# include <sys/types.h>
# include "rtf.h"
# include "rtf2troff.h"
for (p = tab; p->size != 0; p++)
{
if (p->size >= ps)
return (p->width);
}
return (p->width); /* use last width as default */
}
double EnWidth ()
{
/*
Our tpscript uses 720 as resolution base, and character
sizes are 5 times the point size.
*/
if (tvers == PSTROFF)
return (ics->fontSize * 5. / 720.);