summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipng/tfm.c-1.12
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-03 08:07:24 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-03 08:07:24 +0000
commitede83992eb1927a9d6a8d1f0c419218093655768 (patch)
treeb45e2f7683a7b8b3334405e3325ecc036756bd65 /Build/source/texk/dvipng/tfm.c-1.12
parent8d0f2481e39a61f7ce5f5c154b4a47859480ea54 (diff)
some cleanup
git-svn-id: svn://tug.org/texlive/trunk@13597 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipng/tfm.c-1.12')
-rw-r--r--Build/source/texk/dvipng/tfm.c-1.1279
1 files changed, 0 insertions, 79 deletions
diff --git a/Build/source/texk/dvipng/tfm.c-1.12 b/Build/source/texk/dvipng/tfm.c-1.12
deleted file mode 100644
index 9dde751f2f7..00000000000
--- a/Build/source/texk/dvipng/tfm.c-1.12
+++ /dev/null
@@ -1,79 +0,0 @@
-/* tfm.c */
-
-/************************************************************************
-
- Part of the dvipng distribution
-
- 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
- Lesser General Public License for more details.
-
- 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-2008 Jan-Åke Larsson
-
-************************************************************************/
-
-#include "dvipng.h"
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
-
-bool ReadTFM(struct font_entry * tfontp, char* tfmname)
-{
- struct filemmap fmmap;
- struct char_entry *tcharptr;
- unsigned char *position;
- int lh,bc,ec,nw, c;
- dviunits* width;
-
- DEBUG_PRINT((DEBUG_DVI|DEBUG_FT|DEBUG_TFM),
- ("\n OPEN METRICS:\t'%s'", tfmname));
- if (MmapFile(tfmname,&fmmap)) return(false);
- position=(unsigned char*)fmmap.data;
- lh = UNumRead(position+2,2);
- bc = UNumRead(position+4,2);
- ec = UNumRead(position+6,2);
- nw = UNumRead(position+8,2);
- DEBUG_PRINT(DEBUG_TFM,(" %d %d %d %d",lh,bc,ec,nw));
- width=alloca(nw*sizeof(dviunits));
- c=0;
- position=position+24+(lh+ec-bc+1)*4;
- while( c < nw ) {
- width[c] = SNumRead(position,4);
- c++;
- position += 4;
- }
-
- /* Read char widths */
- c=bc;
- position=(unsigned char*)fmmap.data+24+lh*4;
- while(c <= ec) {
- DEBUG_PRINT(DEBUG_TFM,("\n@%ld TFM METRICS:\t",
- (long)position - (long)fmmap.data));
- tcharptr=xmalloc(sizeof(struct char_entry));
- tcharptr->data=NULL;
- tcharptr->tfmw=width[*position];
- DEBUG_PRINT(DEBUG_TFM,("%d [%d] %d",c,*position,tcharptr->tfmw));
- 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 */
- Fatal("tfm file %s exceeds char numbering limit",tfmname);
- tfontp->chr[c] = tcharptr;
- c++;
- position += 4;
- }
- UnMmapFile(&fmmap);
- return(true);
-}
-
-