diff options
author | Karl Berry <karl@freefriends.org> | 2020-01-11 23:45:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-01-11 23:45:23 +0000 |
commit | 05c80cfe06a972990fde7671eb559ff735c7506c (patch) | |
tree | f78de2eb3541356dd07eeafcd82eec99f6f14010 /Build/source/texk/dvipsk/loadfont.c | |
parent | 32013f736fb33d38e83843850e8e9d787b8475f0 (diff) |
bitmap font encoding support from Tom Rokicki
git-svn-id: svn://tug.org/texlive/trunk@53372 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk/loadfont.c')
-rw-r--r-- | Build/source/texk/dvipsk/loadfont.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Build/source/texk/dvipsk/loadfont.c b/Build/source/texk/dvipsk/loadfont.c index b0e6267c00e..6647a2f71b1 100644 --- a/Build/source/texk/dvipsk/loadfont.c +++ b/Build/source/texk/dvipsk/loadfont.c @@ -333,6 +333,10 @@ loadfont(register fontdesctype *curfnt) } } curfnt->maxchars = 256; /* just in case we return before the end */ + curfnt->llx = 0 ; + curfnt->lly = 0 ; + curfnt->urx = 0 ; + curfnt->ury = 0 ; if (!pkopen(curfnt)) { tfmload(curfnt); return; @@ -455,6 +459,21 @@ case 7: *tempr++ = cmd; for (length--; length>0; length--) *tempr++ = pkbyte(); + { + // update the global font bounding box + // this is only used to set font sizes for type 3 bitmap + // encoding. + integer cwidth, cheight, xoff, yoff ; + unpack_bb(cd, &cwidth, &cheight, &xoff, &yoff) ; + if (-xoff < curfnt->llx) + curfnt->llx = -xoff ; + if (cwidth - xoff > curfnt->urx) + curfnt->urx = cwidth - xoff ; + if (yoff - cheight < curfnt->lly) + curfnt->lly = yoff - cheight ; + if (yoff > curfnt->ury) + curfnt->ury = yoff ; + } } cd->flags2 |= EXISTS; } else { |