diff options
Diffstat (limited to 'Build/source/texk/dvipng/tfm.c')
-rw-r--r-- | Build/source/texk/dvipng/tfm.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/Build/source/texk/dvipng/tfm.c b/Build/source/texk/dvipng/tfm.c index 9db2dc8af62..9dde751f2f7 100644 --- a/Build/source/texk/dvipng/tfm.c +++ b/Build/source/texk/dvipng/tfm.c @@ -4,22 +4,21 @@ Part of the dvipng distribution - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2005 Jan-Åke Larsson + Copyright (C) 2002-2008 Jan-Åke Larsson ************************************************************************/ @@ -39,7 +38,7 @@ bool ReadTFM(struct font_entry * tfontp, char* tfmname) DEBUG_PRINT((DEBUG_DVI|DEBUG_FT|DEBUG_TFM), ("\n OPEN METRICS:\t'%s'", tfmname)); if (MmapFile(tfmname,&fmmap)) return(false); - position=(unsigned char*)fmmap.dp_mmap; + position=(unsigned char*)fmmap.data; lh = UNumRead(position+2,2); bc = UNumRead(position+4,2); ec = UNumRead(position+6,2); @@ -56,10 +55,10 @@ bool ReadTFM(struct font_entry * tfontp, char* tfmname) /* Read char widths */ c=bc; - position=(unsigned char*)fmmap.dp_mmap+24+lh*4; + position=(unsigned char*)fmmap.data+24+lh*4; while(c <= ec) { DEBUG_PRINT(DEBUG_TFM,("\n@%ld TFM METRICS:\t", - (long)position - (long)fmmap.dp_mmap)); + (long)position - (long)fmmap.data)); tcharptr=xmalloc(sizeof(struct char_entry)); tcharptr->data=NULL; tcharptr->tfmw=width[*position]; @@ -67,7 +66,7 @@ bool ReadTFM(struct font_entry * tfontp, char* tfmname) tcharptr->tfmw = (dviunits) ((int64_t) tcharptr->tfmw * tfontp->s / (1 << 20)); DEBUG_PRINT(DEBUG_TFM,(" (%d)",tcharptr->tfmw)); - if (c > NFNTCHARS) /* Only positive for now */ + if (c >= NFNTCHARS) /* Only positive for now */ Fatal("tfm file %s exceeds char numbering limit",tfmname); tfontp->chr[c] = tcharptr; c++; |