summaryrefslogtreecommitdiff
path: root/src/Type1/t1funcs.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:28:20 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:28:20 +0000
commitfb0cbe6e7287d635a5f368e055cc0aae6ed50125 (patch)
tree24940f60afb7e084ca0760710bf9d1ffd21c384a /src/Type1/t1funcs.c
parentca219ad2fc4f392505d378dfa5a2b34d33de6d61 (diff)
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16
Diffstat (limited to 'src/Type1/t1funcs.c')
-rw-r--r--src/Type1/t1funcs.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/Type1/t1funcs.c b/src/Type1/t1funcs.c
index 20b7b66..70da203 100644
--- a/src/Type1/t1funcs.c
+++ b/src/Type1/t1funcs.c
@@ -71,7 +71,7 @@
* The Original Software is CID font code that was developed by Silicon
* Graphics, Inc.
*/
-/* $XFree86: xc/lib/font/Type1/t1funcs.c,v 3.30 2002/12/09 17:29:59 dawes Exp $ */
+/* $XFree86: xc/lib/font/Type1/t1funcs.c,v 3.33 2003/07/19 13:16:40 tsi Exp $ */
/*
@@ -204,7 +204,6 @@ CIDOpenScalable (FontPathElementPtr fpe,
glyph,
scan,
image;
- int pad,wordsize; /* scan & image in bits */
long *pool; /* memory pool for ximager objects */
int size; /* for memory size calculations */
struct XYspace *S; /* coordinate space for character */
@@ -227,8 +226,9 @@ CIDOpenScalable (FontPathElementPtr fpe,
#endif
#if defined(CID_ALL_CHARS)
char *cf;
-#endif
+#else
long sAscent, sDescent;
+#endif
/* check the font name */
len = strlen(fileName);
@@ -325,9 +325,6 @@ CIDOpenScalable (FontPathElementPtr fpe,
if (rc != Successful)
return rc;
- pad = glyph * 8;
- wordsize = scan * 8;
-
#define PAD(bits, pad) (((bits)+(pad)-1)&-(pad))
if (!(pFont = CreateFontRec()))
@@ -461,8 +458,10 @@ CIDOpenScalable (FontPathElementPtr fpe,
/* CID-keyed are not constant-width fonts. */
pFont->info.constantWidth = 0;
+#ifndef CID_ALL_CHARS
sAscent = CIDFontP->CIDfontInfoP[CIDFONTBBOX].value.data.arrayP[3].data.integer;
sDescent = -CIDFontP->CIDfontInfoP[CIDFONTBBOX].value.data.arrayP[1].data.integer;
+#endif
if (strncmp(entry->name.name, "-bogus", 6)) {
#ifdef CID_ALL_CHARS
@@ -508,8 +507,7 @@ Type1OpenScalable (FontPathElementPtr fpe,
struct XYspace *S; /* coordinate space for character */
struct region *area;
CharInfoRec *glyphs;
- register int i;
- int len, rc, count = 0;
+ int len, rc, count = 0, i = 0;
struct type1font *type1;
char *p;
FontMapPtr mapping = NULL;
@@ -617,6 +615,9 @@ Type1OpenScalable (FontPathElementPtr fpe,
no_mapping=1; /* font's native encoding vector */
}
+ pFont->info.firstCol = 255;
+ pFont->info.lastCol = 0;
+
if(!no_mapping) {
mapping = FontEncMapFind(p,
FONT_ENCODING_POSTSCRIPT, -1, -1,
@@ -626,14 +627,11 @@ Type1OpenScalable (FontPathElementPtr fpe,
FONT_ENCODING_UNICODE, -1, -1,
fileName);
if(!mapping)
- no_mapping=2;
+ goto NoEncoding;
else
no_mapping=0;
}
- pFont->info.firstCol = 255;
- pFont->info.lastCol = 0;
-
for (i=0; i < 256; i++) {
long h,w;
long paddedW;
@@ -757,7 +755,8 @@ Type1OpenScalable (FontPathElementPtr fpe,
Destroy(area);
}
-
+ NoEncoding:
+
delmemory();
xfree(pool);
@@ -948,7 +947,7 @@ CIDGetGlyphs(FontPtr pFont,
unsigned long *glyphCount, /* RETURN */
CharInfoPtr *glyphs) /* RETURN */
{
- unsigned int firstRow, numRows, code, char_row, char_col;
+ unsigned int code, char_row, char_col;
CharInfoPtr *glyphsBase;
register unsigned int c;
CharInfoPtr pci;
@@ -1040,8 +1039,6 @@ CIDGetGlyphs(FontPtr pFont,
break;
case TwoD16Bit:
- firstRow = pFont->info.firstRow;
- numRows = pFont->info.lastRow - firstRow + 1;
while (count--) {
char_row = (*chars++);
char_col = (*chars++);