[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mfnt_054 font problems?




> Sounds definitively like a problem with the digit-space. I'll give it
> fig_height. Is this only a problem for dvips ? I don't remember seeing
> any error message from xdvi. Isn't

> charwd:=9u#; charht:=0; chardp:=0; charic:=0;
> charcode:=slot_digitspace; shipout nullpicture;

> a legal way to create an empty glyph with nonzero width ?

Maybe it's the nullpicture?  It appears that dvips doesn't like
characters with non-zero TFM width but with zero pixel width.
For dvips it seems necessary to ship out a character containing
a row of empty pixels as wide as the TFM width, so that the 
advanced width is calculated properly.

Below is relevant code fragment where dvips sets |munged++|.
Not that the internal width |cd->pixelwidth| is adjusted to
match the TFM width.

dvipsk/loadfont.c:
- - - - - - - - - - - - - - - - - 
[...]
   while ((cmd=pkbyte())!=245) {
      if (cmd < 240) {
         switch (cmd & 7) {
[...]
case 7:
            length = pkquad() - 11 ;
            cc = pkquad() ;
            if (cc<0 || cc>255) badpk("character code out of range") ;
            cd = curfnt->chardesc + cc ;
            cd->flags |= BIGCHAR ;
            cd->TFMwidth = scalewidth(pkquad(), scaledsize) ;
            cd->pixelwidth = (pkquad() + 32768) >> 16 ;
            k = pkquad() ;
         }
         if (cd->pixelwidth == 0 && cd->TFMwidth != 0) {
            if (cd->TFMwidth > 0)
               k = (integer)(cd->TFMwidth * conv + 0.5) ;
            else
               k = -(integer)(-cd->TFMwidth * conv + 0.5) ;
            if (k != 0) {
               cd->pixelwidth = k ;
               munged++ ;
            }
         }
[...]
- - - - - - - - - - - - - - - - -