Dear Akiro,

do you use that patch yourself or have just hacked it?

Some comments on it:
0) No trfonts.nam or trchars.adj in tetex.
1) As character names in groff font metrics files may be 8bit.
thus the "hash" function has to be changed as follows to avoid
core dupms if compiled with signed char.
int hash P1C(char*,s)
{
    register int r;
    for(r=0; *s!=0; s++) {
/* GROFF - in font metrics file the character name may be 8bit
   - convert to unsigned to avoid negative numbers */
        r = (r<<1) + ( (unsigned char)*s );
        while (r>=Hprime) r-=Hprime;
    }
    return r;
}
2) a large part of get_dho function is just a reinvention of strtol
function. Why not to use it?

3) the following piece of you patch
+#ifdef GROFF
+       fprintf(mpxf,",%.5f,%.4f,%.4f);\n", m / 1000, x,y);
+#else
        fprintf(mpxf,",%.5f,%.4f,%.4f);\n", m, x,y);
+#endif
seems to fix  the following change in groff
       The argument to the s command is in scaled  points  (units
       of points/n, where n is the argument to the sizescale com-
       mand  in the DESC file.)  The  argument  to  the  x Height
       command is also in scaled points.

The following patch ( from Kong Hoon Lee post at comp.tex.text)
seems to solve the problem in a more evident way.
@@ -1056,6 +1093,17 @@
     case 'H':
        while (*s!=' ' && *s!='\t') s++;
        Xheight = get_float(s);
+       /* GROFF troff output is scaled
+          man groff_out told me
+          The argument to the s command is in scaled  points  (units
+          of points/n, where n is the argument to the sizescale com-
+          mand  in the DESC file.)  The  argument  to  the  x Height
+          command is also in scaled points.
+
+          sizescale for groff devps is 1000
+       */
+       if(unit != 0.0) Xheight *= unit;
+       else Xheight /= 1000.0;
        if (Xheight==cursize) Xheight=0.0;
        break;
     case 'S':
@@ -1104,6 +1152,17 @@
                break;
            case 's':
                cursize = get_float(c+1);
+               /* GROFF troff output is scaled
+                  man groff_out told me
+                  The argument to the s command is in scaled  points  (units
+                  of points/n, where n is the argument to the sizescale com-
+                  mand  in the DESC file.)  The  argument  to  the  x Height
+                  command is also in scaled points.
+
+                  sizescale for groff devps is 1000
+               */
+               if(unit != 0.0) cursize *= unit;
+               else cursize /= 1000.0;
                goto iarg;
            case 'f':
                change_font(get_int(c+1));
@@ -1152,6 +1211,9 @@
                goto eoln;
            case '#':
                goto eoln;
+           /* GROFF uses this command */
+           case 'F':
+               goto eoln;
            default:
                quit("Bad command in troff output","","");
            }

             Sincerely, Michail

Reply via email to