diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-11-29 14:04:18 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-11-29 14:04:18 +0000 |
commit | 3fb3ef70709de71399ece9e87194a3b9cc3f5118 (patch) | |
tree | 6681a3db6282dda17f91a2bf8c3b0c1b5f59d6d1 /Build/source/texk/dvipsk/download.c | |
parent | c01067dd32dd5d432ac6e409753c95e3ff8b43ca (diff) |
still more writet1.c tweaks
git-svn-id: svn://tug.org/texlive/trunk@20599 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk/download.c')
-rw-r--r-- | Build/source/texk/dvipsk/download.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/Build/source/texk/dvipsk/download.c b/Build/source/texk/dvipsk/download.c index 055b2705e64..cd71ce1e5d3 100644 --- a/Build/source/texk/dvipsk/download.c +++ b/Build/source/texk/dvipsk/download.c @@ -328,6 +328,7 @@ download(charusetype *p, int psfont) fprintf(bitfile, "%%EndDVIPSBitmapFont\n"); } +#ifdef DOWNLOAD_USING_PDFTEX /* * Magic code to deal with PostScript font partial downloading. * We track the encodings we've seen so far and keep them in these @@ -336,14 +337,14 @@ download(charusetype *p, int psfont) static struct seenEncodings { struct seenEncodings *next; const char *name; - const char **glyphs; + char **glyphs; } *seenEncodings; -#define MAX_CHAR_CODE 255 + /* * Load a new encoding and return the array of glyphs as a vector. * Linear search. */ -static const char **getEncoding(char *encoding) { +static char **getEncoding(char *encoding) { struct seenEncodings *p = seenEncodings; while (p != 0) if (strcmp(encoding, p->name) == 0) @@ -351,15 +352,11 @@ static const char **getEncoding(char *encoding) { else p = p->next; if (p == 0) { - int i; p = (struct seenEncodings *)mymalloc(sizeof(struct seenEncodings)); p->next = seenEncodings; seenEncodings = p; p->name = xstrdup(encoding); - p->glyphs = (const char **)mymalloc((MAX_CHAR_CODE+1) * sizeof(char *)); - for (i=0; i<=MAX_CHAR_CODE; i++) - p->glyphs[i] = ".notdef"; - load_enc(encoding, p->glyphs); + p->glyphs = load_enc_file(encoding); } return p->glyphs; } @@ -375,7 +372,6 @@ static const char **getEncoding(char *encoding) { * the memory allocated for this is in extraGlyphSpace. */ static char *extraGlyphs = 0; -#ifdef DOWNLOAD_USING_PDFTEX static char *extraGlyphSpace = 0; static int extraGlyphSize = 0; static int glyphSizeUsed = 0; @@ -423,9 +419,7 @@ static void addGlyph(const char *glyphName) { static void downpsfont(charusetype *p, charusetype *all) { -#ifdef DOWNLOAD_USING_PDFTEX static unsigned char grid[256]; -#endif int GridCount; register int b; register halfword bit; @@ -470,7 +464,7 @@ downpsfont(charusetype *p, charusetype *all) curfnt = all->fd; #ifdef DOWNLOAD_USING_PDFTEX if (curfnt->resfont->Vectfile) { - const char **glyphs = getEncoding(curfnt->resfont->Vectfile); + char **glyphs = getEncoding(curfnt->resfont->Vectfile); c = curfnt->chardesc + 255; cc = 255; for (b=15; b>=0; b--) { @@ -506,7 +500,11 @@ downpsfont(charusetype *p, charusetype *all) GridCount++; } } - if(GridCount!=0 || extraGlyphs) { + if(GridCount!=0 +#ifdef DOWNLOAD_USING_PDFTEX + || extraGlyphs +#endif + ) { newline(); if (! disablecomments) fprintf(bitfile, "%%%%BeginFont: %s\n", rf->PSname); |