summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FreeType/ft.h2
-rw-r--r--src/FreeType/ftfuncs.c241
-rw-r--r--src/FreeType/ftfuncs.h1
-rw-r--r--src/FreeType/fttools.c9
-rw-r--r--src/Speedo/spfont.c2
-rw-r--r--src/Type1/arith.c6
-rw-r--r--src/Type1/curves.c5
-rw-r--r--src/Type1/hints.c5
-rw-r--r--src/Type1/objects.c1
-rw-r--r--src/Type1/paths.c4
-rw-r--r--src/Type1/regions.c4
-rw-r--r--src/Type1/scanfont.c2
-rw-r--r--src/Type1/spaces.c1
-rw-r--r--src/Type1/t1funcs.c3
-rw-r--r--src/Type1/t1malloc.c2
-rw-r--r--src/Type1/t1stub.c1
-rw-r--r--src/bitmap/pcfread.c1
-rw-r--r--src/fc/fserve.c2
-rw-r--r--src/fontfile/defaults.c1
-rw-r--r--src/fontfile/ffcheck.c3
-rw-r--r--src/fontfile/fontdir.c2
-rw-r--r--src/fontfile/fontfile.c2
-rw-r--r--src/fontfile/register.c3
-rw-r--r--src/util/utilbitmap.c5
24 files changed, 220 insertions, 88 deletions
diff --git a/src/FreeType/ft.h b/src/FreeType/ft.h
index 91c8d42..8ad8403 100644
--- a/src/FreeType/ft.h
+++ b/src/FreeType/ft.h
@@ -28,6 +28,8 @@ THE SOFTWARE.
#include <X11/Xfuncproto.h>
+#define FREETYPE_VERSION (FREETYPE_MAJOR * 1000000 + FREETYPE_MINOR * 1000 + FREETYPE_PATCH)
+
#undef DEBUG_TRUETYPE
#ifdef DEBUG_TRUETYPE
diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
index 9c7d17e..68cb0a3 100644
--- a/src/FreeType/ftfuncs.c
+++ b/src/FreeType/ftfuncs.c
@@ -5,7 +5,7 @@ Copyright (c) 1998 Go Watanabe, All rights reserved.
Copyright (c) 1998 Kazushi (Jam) Marukawa, All rights reserved.
Copyright (c) 1998 Takuya SHIOZAKI, All rights reserved.
Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
-Copyright (c) 2003 After X-TT Project, All rights reserved.
+Copyright (c) 2003-2004 After X-TT Project, All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* $XdotOrg: xc/lib/font/FreeType/ftfuncs.c,v 1.1.4.4.2.2 2004/03/04 17:47:03 eich Exp $ */
+/* $XdotOrg: xc/lib/font/FreeType/ftfuncs.c,v 1.7 2004/08/04 12:21:48 eich Exp $ */
/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.43 2004/02/07 04:37:18 dawes Exp $ */
@@ -52,10 +52,9 @@ THE SOFTWARE.
#include FT_XFREE86_H
#include FT_BBOX_H
#include FT_INTERNAL_TRUETYPE_TYPES_H
-#ifdef USE_INTERNAL_FREETYPE
-# include "ttobjs.h"
-#endif
-
+#include FT_TRUETYPE_TAGS_H
+#include FT_INTERNAL_SFNT_H
+#include FT_INTERNAL_STREAM_H
/*
* If you want to use FT_Outline_Get_CBox instead of
* FT_Outline_Get_BBox, define here.
@@ -122,7 +121,7 @@ static char *xlfd_props[] = {
static int ftypeInitP = 0; /* is the engine initialised? */
-static FT_Library ftypeLibrary;
+FT_Library ftypeLibrary;
static FTFacePtr faceTable[NUMFACEBUCKETS];
@@ -459,6 +458,33 @@ FreeTypeOpenInstance(FTInstancePtr *instance_return, FTFacePtr face,
return FTtoXReturnCode(ftrc);
}
+ if( FT_IS_SFNT( face->face ) ) {
+ /* See Set_Char_Sizes() in ttdriver.c */
+ FT_Error err;
+ TT_Face tt_face;
+ FT_Long tt_dim_x, tt_dim_y;
+ FT_UShort tt_x_ppem, tt_y_ppem;
+ FT_F26Dot6 tt_char_width, tt_char_height;
+ SFNT_Service sfnt;
+ tt_face=(TT_Face)face->face;
+ tt_char_width = (int)(trans->scale*(1<<6) + 0.5);
+ tt_char_height = (int)(trans->scale*(1<<6) + 0.5);
+ if ( ( tt_face->header.Flags & 8 ) != 0 ) {
+ tt_dim_x = ( ( tt_char_width * trans->xres + (36+32*72) ) / 72 ) & -64;
+ tt_dim_y = ( ( tt_char_height * trans->yres + (36+32*72) ) / 72 ) & -64;
+ }
+ else{
+ tt_dim_x = ( ( tt_char_width * trans->xres + 36 ) / 72 );
+ tt_dim_y = ( ( tt_char_height * trans->yres + 36 ) / 72 );
+ }
+ tt_x_ppem = (FT_UShort)( tt_dim_x >> 6 );
+ tt_y_ppem = (FT_UShort)( tt_dim_y >> 6 );
+ /* See Reset_SBit_Size() in ttobjs.c */
+ sfnt = (SFNT_Service)tt_face->sfnt;
+ err = sfnt->set_sbit_strike(tt_face,tt_x_ppem,tt_y_ppem,&instance->strike_index);
+ if ( err ) instance->strike_index=0xFFFFU;
+ }
+
/* maintain a linked list of instances */
instance->next = instance->face->instances;
instance->face->instances = instance;
@@ -876,53 +902,113 @@ ft_get_very_lazy_bbox( FT_UInt index,
return -1;
}
+static FT_Error
+FT_Do_SBit_Metrics( FT_Face ft_face, FT_Size ft_size, FT_ULong strike_index,
+ FT_UShort glyph_index, FT_Glyph_Metrics *metrics_return,
+ int *sbitchk_incomplete_but_exist )
+{
+#if (FREETYPE_VERSION >= 2001008)
+ SFNT_Service sfnt;
+ TT_Face face;
+ FT_Error error;
+ FT_Stream stream;
+ TT_SBit_Strike strike;
+ TT_SBit_Range range;
+ TT_SBit_MetricsRec elem_metrics;
+ FT_ULong ebdt_pos;
+ FT_ULong glyph_offset;
+ ;
+
+ if ( ! FT_IS_SFNT( ft_face ) )
+ {
+ error=-1;
+ goto Exit;
+ }
+
+ face = (TT_Face)ft_face;
+ sfnt = (SFNT_Service)face->sfnt;
+
+ if ( strike_index != 0xFFFFU && sfnt->load_sbits ) {
+ /* Check whether there is a glyph sbit for the current index */
+ error = sfnt->find_sbit_image( face, glyph_index, strike_index,
+ &range, &strike, &glyph_offset );
+ }
+ else error=-1;
+ if ( error ) goto Exit;
+
+ if ( metrics_return == NULL ) goto Exit;
+
+ stream = face->root.stream;
+
+ /* now, find the location of the `EBDT' table in */
+ /* the font file */
+ error = face->goto_table( face, TTAG_EBDT, stream, 0 );
+ if ( error )
+ error = face->goto_table( face, TTAG_bdat, stream, 0 );
+ if (error)
+ goto Exit;
+
+ ebdt_pos = FT_STREAM_POS();
+
+ /* place stream at beginning of glyph data and read metrics */
+ if ( FT_STREAM_SEEK( ebdt_pos + glyph_offset ) )
+ goto Exit;
+
+ error = sfnt->load_sbit_metrics( stream, range, &elem_metrics );
+ if ( error )
+ goto Exit;
+
+ metrics_return->width = (FT_Pos)elem_metrics.width << 6;
+ metrics_return->height = (FT_Pos)elem_metrics.height << 6;
+
+ metrics_return->horiBearingX = (FT_Pos)elem_metrics.horiBearingX << 6;
+ metrics_return->horiBearingY = (FT_Pos)elem_metrics.horiBearingY << 6;
+ metrics_return->horiAdvance = (FT_Pos)elem_metrics.horiAdvance << 6;
+
+ metrics_return->vertBearingX = (FT_Pos)elem_metrics.vertBearingX << 6;
+ metrics_return->vertBearingY = (FT_Pos)elem_metrics.vertBearingY << 6;
+ metrics_return->vertAdvance = (FT_Pos)elem_metrics.vertAdvance << 6;
+
+ Exit:
+ return error;
+#else /* if (FREETYPE_VERSION < 2001008) */
+ TT_Face face;
+ SFNT_Service sfnt;
+ if ( ! FT_IS_SFNT( ft_face ) ) return -1;
+ face = (TT_Face)ft_face;
+ sfnt = (SFNT_Service)face->sfnt;
+ if ( strike_index != 0xFFFFU && sfnt->load_sbits ) {
+ if ( sbitchk_incomplete_but_exist ) *sbitchk_incomplete_but_exist=1;
+ }
+ return -1;
+#endif
+}
+
int
FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
FTInstancePtr instance, int hasMetrics)
{
FTFacePtr face;
- FT_Bitmap *bitmap;
FT_BBox bbox;
- FT_Long outline_hori_advance;
- FT_Long outline_vert_advance;
- char *raster = NULL;
- FT_Glyph_Metrics *metrics = NULL;
+ FT_Long outline_hori_advance, outline_vert_advance;
+ FT_Glyph_Metrics sbit_metrics;
+ FT_Glyph_Metrics *bitmap_metrics=NULL, *metrics = NULL;
+ char *raster;
int wd, ht, bpr; /* width, height, bytes per row */
int wd_actual, ht_actual;
- int ftrc, is_outline, b_shift=0, correct=0;
+ int ftrc, is_outline, correct, b_shift=0;
int dx, dy;
int leftSideBearing, rightSideBearing, characterWidth, rawCharacterWidth,
ascent, descent;
+ int sbitchk_incomplete_but_exist;
double bbox_center_raw;
face = instance->face;
FreeTypeActivateInstance(instance);
- bitmap = &face->face->glyph->bitmap;
-
if(!tgp) return AllocError;
- if( instance->spacing == FT_CHARCELL ) correct=1;
- else if( flags & FT_FORCE_CONSTANT_SPACING ) correct=1;
- else if( instance->ttcap.flags & TTCAP_IS_VERY_LAZY ){
- if( hasMetrics || (!hasMetrics && (flags & FT_GET_GLYPH_METRICS_ONLY)) ){
- /* If sbit is available, we don't use very lazy method. */
- /* See TT_Load_Glyph */
- if( FT_IS_SFNT( face->face ) ) {
-#ifdef USE_INTERNAL_FREETYPE
- TT_Size tt_size = (TT_Size)instance->size;
- if( !( !(instance->load_flags & FT_LOAD_NO_BITMAP)
- && tt_size->strike_index != 0xFFFFU ) )
-#else
- if((instance->load_flags & FT_LOAD_NO_BITMAP)
- || (face->face->face_flags & FT_FACE_FLAG_FIXED_SIZES) == 0)
-#endif
- correct=1;
- }
- }
- }
-
/*
* PREPARE METRICS
*/
@@ -940,34 +1026,45 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
}
/* mono or prop. */
else{
- int new_width, try_very_lazy=correct;
+ int new_width;
double ratio;
- if( try_very_lazy ) {
- if( ft_get_very_lazy_bbox( idx, face->face, instance->size,
- instance->ttcap.vl_slant,
- &instance->transformation.matrix,
- &bbox, &outline_hori_advance,
- &outline_vert_advance ) == 0 ) {
- goto bbox_ok; /* skip exact calculation */
+ sbitchk_incomplete_but_exist=0;
+ if( ! (instance->load_flags & FT_LOAD_NO_BITMAP) ) {
+ if( FT_Do_SBit_Metrics(face->face,instance->size,instance->strike_index,
+ idx,&sbit_metrics,&sbitchk_incomplete_but_exist)==0 ) {
+ bitmap_metrics = &sbit_metrics;
+ }
+ }
+ if( bitmap_metrics == NULL ) {
+ if ( sbitchk_incomplete_but_exist==0 && (instance->ttcap.flags & TTCAP_IS_VERY_LAZY) ) {
+ if( ft_get_very_lazy_bbox( idx, face->face, instance->size,
+ instance->ttcap.vl_slant,
+ &instance->transformation.matrix,
+ &bbox, &outline_hori_advance,
+ &outline_vert_advance ) == 0 ) {
+ goto bbox_ok; /* skip exact calculation */
+ }
+ }
+ ftrc = FT_Load_Glyph(instance->face->face, idx,
+ instance->load_flags);
+ if(ftrc != 0) return FTtoXReturnCode(ftrc);
+ metrics = &face->face->glyph->metrics;
+ if( face->face->glyph->format == FT_GLYPH_FORMAT_BITMAP ) {
+ bitmap_metrics = metrics;
}
}
- ftrc = FT_Load_Glyph(instance->face->face, idx,
- instance->load_flags);
- metrics = &face->face->glyph->metrics;
-
- if(ftrc != 0) return FTtoXReturnCode(ftrc);
-
- if( face->face->glyph->format == FT_GLYPH_FORMAT_BITMAP ) {
- /* bitmap, embedded bitmap */
- leftSideBearing = metrics->horiBearingX / 64;
- rightSideBearing = (metrics->width + metrics->horiBearingX) / 64;
- bbox_center_raw = (2.0 * metrics->horiBearingX + metrics->width)/2.0/64.0;
- characterWidth = (int)floor(metrics->horiAdvance
+ if( bitmap_metrics ) {
+ FT_Pos factor;
+
+ leftSideBearing = bitmap_metrics->horiBearingX / 64;
+ rightSideBearing = (bitmap_metrics->width + bitmap_metrics->horiBearingX) / 64;
+ bbox_center_raw = (2.0 * bitmap_metrics->horiBearingX + bitmap_metrics->width)/2.0/64.0;
+ characterWidth = (int)floor(bitmap_metrics->horiAdvance
* instance->ttcap.scaleBBoxWidth / 64.0 + .5);
- ascent = metrics->horiBearingY / 64;
- descent = (metrics->height - metrics->horiBearingY) / 64 ;
+ ascent = bitmap_metrics->horiBearingY / 64;
+ descent = (bitmap_metrics->height - bitmap_metrics->horiBearingY) / 64 ;
/* */
new_width = characterWidth;
if( instance->ttcap.flags & TTCAP_DOUBLE_STRIKE_CORRECT_B_BOX_WIDTH )
@@ -983,8 +1080,8 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
rightSideBearing += instance->ttcap.rsbShiftOfBitmapAutoItalic;
leftSideBearing += instance->ttcap.lsbShiftOfBitmapAutoItalic;
/* */
- rawCharacterWidth =
- (unsigned short)(short)(floor(1000 * metrics->horiAdvance
+ factor = bitmap_metrics->horiAdvance;
+ rawCharacterWidth = (unsigned short)(short)(floor(1000 * factor
* instance->ttcap.scaleBBoxWidth * ratio / 64.
/ instance->pixel_size));
}
@@ -1068,6 +1165,30 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
if( flags & FT_GET_GLYPH_METRICS_ONLY ) return Successful;
/*
+ * CHECK THE NECESSITY OF BITMAP POSITION'S CORRECTION
+ */
+
+ correct=0;
+ if( instance->spacing == FT_CHARCELL ) correct=1;
+ else if( flags & FT_FORCE_CONSTANT_SPACING ) correct=1;
+ else{
+ int sbit_available=0;
+ sbitchk_incomplete_but_exist=0;
+ if( !(instance->load_flags & FT_LOAD_NO_BITMAP) ) {
+ if( FT_Do_SBit_Metrics(face->face,instance->size,
+ instance->strike_index,idx,NULL,
+ &sbitchk_incomplete_but_exist)==0 ) {
+ sbit_available=1;
+ }
+ }
+ if( sbit_available == 0 ) {
+ if ( sbitchk_incomplete_but_exist==0 && (instance->ttcap.flags & TTCAP_IS_VERY_LAZY) ) {
+ if( FT_IS_SFNT(face->face) ) correct=1;
+ }
+ }
+ }
+
+ /*
* RENDER AND ALLOCATE BUFFER
*/
@@ -1209,11 +1330,13 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
*/
{
+ FT_Bitmap *bitmap;
int i, j;
unsigned char *current_raster;
unsigned char *current_buffer;
int mod_dx0,mod_dx1;
int div_dx;
+ bitmap = &face->face->glyph->bitmap;
if( 0 <= dx ){
div_dx = dx / 8;
mod_dx0 = dx % 8;
diff --git a/src/FreeType/ftfuncs.h b/src/FreeType/ftfuncs.h
index 6777667..89da563 100644
--- a/src/FreeType/ftfuncs.h
+++ b/src/FreeType/ftfuncs.h
@@ -121,6 +121,7 @@ typedef struct _FTInstance {
FT_Size size;
FTNormalisedTransformationRec transformation;
FT_Int32 load_flags;
+ FT_ULong strike_index;
int spacing; /* actual spacing */
double pixel_size; /* to calc attributes (actual height) */
double pixel_width_unit_x; /* to calc horiz. width (cosine) */
diff --git a/src/FreeType/fttools.c b/src/FreeType/fttools.c
index 2cde03a..1567724 100644
--- a/src/FreeType/fttools.c
+++ b/src/FreeType/fttools.c
@@ -40,6 +40,13 @@
#include FT_TRUETYPE_IDS_H
#include "ft.h"
+/* backward compatibility hack */
+#if (FREETYPE_VERSION < 2001008)
+# ifndef ft_isdigit
+# define ft_isdigit isdigit
+# endif
+#endif
+
#ifndef LSBFirst
#define LSBFirst 0
#define MSBFirst 1
@@ -169,7 +176,7 @@ FTcheckForTTCName(char *fileName, char **realFileName, int *faceNumber)
if(start) {
fn=0;
i=1;
- while(isdigit(start[i])) {
+ while(ft_isdigit(start[i])) {
fn *= 10;
fn += start[i]-'0';
i++;
diff --git a/src/Speedo/spfont.c b/src/Speedo/spfont.c
index 04d2f90..c430f6e 100644
--- a/src/Speedo/spfont.c
+++ b/src/Speedo/spfont.c
@@ -57,7 +57,6 @@ from The Open Group.
#include "FSproto.h"
#include "spint.h"
-#include "servermd.h"
#include "fontutil.h"
#ifndef FONTMODULE
#ifdef _XOPEN_SOURCE
@@ -68,6 +67,7 @@ from The Open Group.
#undef _XOPEN_SOURCE
#endif
#else
+#include "servermd.h"
#include "xf86_ansic.h"
#endif
diff --git a/src/Type1/arith.c b/src/Type1/arith.c
index c9de69f..35191d9 100644
--- a/src/Type1/arith.c
+++ b/src/Type1/arith.c
@@ -49,8 +49,10 @@ assembly language, unlike C, will have 64-bit multiply products and
The included files are:
*/
-
-#include "os.h"
+
+#ifdef FONTMODULE
+# include "os.h"
+#endif
#include "objects.h"
#include "spaces.h"
#include "arith.h"
diff --git a/src/Type1/curves.c b/src/Type1/curves.c
index 36336e4..b26c35c 100644
--- a/src/Type1/curves.c
+++ b/src/Type1/curves.c
@@ -43,8 +43,9 @@ through.
Include files needed:
*/
-
-#include "os.h"
+#ifdef FONTMODULE
+# include "os.h"
+#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
diff --git a/src/Type1/hints.c b/src/Type1/hints.c
index 691da9b..78aff15 100644
--- a/src/Type1/hints.c
+++ b/src/Type1/hints.c
@@ -40,8 +40,9 @@ W. Pryor, Jr.
The included files are:
*/
-
-#include "os.h"
+#ifdef FONTMODULE
+# include "os.h"
+#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
diff --git a/src/Type1/objects.c b/src/Type1/objects.c
index e79b338..ca296e7 100644
--- a/src/Type1/objects.c
+++ b/src/Type1/objects.c
@@ -58,7 +58,6 @@ you do do not need to include these header files.
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
-#include "os.h"
#else
#include "Xdefs.h" /* Bool declaration */
#include "Xmd.h" /* INT32 declaration */
diff --git a/src/Type1/paths.c b/src/Type1/paths.c
index 4fa5f06..6860ca1 100644
--- a/src/Type1/paths.c
+++ b/src/Type1/paths.c
@@ -44,7 +44,9 @@ The included files are:
*/
/* after the system includes (dsr) */
-#include "os.h"
+#ifdef FONTMODULE
+# include "os.h"
+#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
diff --git a/src/Type1/regions.c b/src/Type1/regions.c
index f747c8a..4d110ea 100644
--- a/src/Type1/regions.c
+++ b/src/Type1/regions.c
@@ -41,7 +41,9 @@ This module is responsible for creating and manipulating regions.
The included files are:
*/
-#include "os.h"
+#ifdef FONTMODULE
+# include "os.h"
+#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
diff --git a/src/Type1/scanfont.c b/src/Type1/scanfont.c
index 86d1cc6..1ccef28 100644
--- a/src/Type1/scanfont.c
+++ b/src/Type1/scanfont.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/lib/font/Type1/scanfont.c,v 1.1.4.3.4.1 2004/03/04 17:47:04 eich Exp $ */
+/* $XdotOrg: xc/lib/font/Type1/scanfont.c,v 1.2 2004/04/23 18:44:09 eich Exp $ */
/* $Xorg: scanfont.c,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */
/* Copyright International Business Machines,Corp. 1991
* All Rights Reserved
diff --git a/src/Type1/spaces.c b/src/Type1/spaces.c
index 1b2e7ae..52e1105 100644
--- a/src/Type1/spaces.c
+++ b/src/Type1/spaces.c
@@ -46,7 +46,6 @@ This module is responsible for handling the TYPE1IMAGER "XYspace" object.
#include "xf86_ansic.h"
#else
#include "X11/Xos.h"
-#include "os.h"
#endif
#include "objects.h"
#include "spaces.h"
diff --git a/src/Type1/t1funcs.c b/src/Type1/t1funcs.c
index ecbd4d2..076c00b 100644
--- a/src/Type1/t1funcs.c
+++ b/src/Type1/t1funcs.c
@@ -125,9 +125,8 @@ from The Open Group.
#include "Xdefs.h"
#endif
-#include "os.h"
-
#ifdef FONTMODULE
+#include "os.h"
#include "xf86_ansic.h"
#endif
diff --git a/src/Type1/t1malloc.c b/src/Type1/t1malloc.c
index 9c885a0..d311d1e 100644
--- a/src/Type1/t1malloc.c
+++ b/src/Type1/t1malloc.c
@@ -43,8 +43,6 @@ routines (malloc/free).
#include "Xmd.h" /* INT32 declaration */
#include "os.h"
#include "xf86_ansic.h"
-#else
-#include "os.h"
#endif
#include "objects.h" /* get #define for Abort() */
diff --git a/src/Type1/t1stub.c b/src/Type1/t1stub.c
index 2c6cfed..1ced8ef 100644
--- a/src/Type1/t1stub.c
+++ b/src/Type1/t1stub.c
@@ -36,7 +36,6 @@
#include "xf86_ansic.h"
#else
#include <stdio.h>
-#include "os.h"
#endif
#include "objects.h" /* get #define for Abort() */
diff --git a/src/bitmap/pcfread.c b/src/bitmap/pcfread.c
index ed496be..0b4b6c7 100644
--- a/src/bitmap/pcfread.c
+++ b/src/bitmap/pcfread.c
@@ -908,7 +908,6 @@ pmfReadFont(FontPtr pFont, FontFilePtr file,
if (IS_EOF(file)) goto Bail;
if (encodingOffset == 0xFFFF) {
pFont->info.allExist = FALSE;
- encoding[i] = 0;
} else {
if(!encoding[SEGMENT_MAJOR(i)]) {
encoding[SEGMENT_MAJOR(i)]=
diff --git a/src/fc/fserve.c b/src/fc/fserve.c
index 1dab860..018c22c 100644
--- a/src/fc/fserve.c
+++ b/src/fc/fserve.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/lib/font/fc/fserve.c,v 1.1.4.4.2.1 2004/03/04 17:47:11 eich Exp $ */
+/* $XdotOrg: xc/lib/font/fc/fserve.c,v 1.2 2004/04/23 18:44:21 eich Exp $ */
/* $Xorg: fserve.c,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */
/*
diff --git a/src/fontfile/defaults.c b/src/fontfile/defaults.c
index fb9dc81..41b958e 100644
--- a/src/fontfile/defaults.c
+++ b/src/fontfile/defaults.c
@@ -33,7 +33,6 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <servermd.h>
#ifndef DEFAULT_BIT_ORDER
#ifdef BITMAP_BIT_ORDER
diff --git a/src/fontfile/ffcheck.c b/src/fontfile/ffcheck.c
index 8a97a6e..5a6843b 100644
--- a/src/fontfile/ffcheck.c
+++ b/src/fontfile/ffcheck.c
@@ -137,9 +137,6 @@ FontFileCheckRegisterFpeFunctions (void)
#ifdef BUILD_FREETYPE
FreeTypeRegisterFontFileFunctions();
#endif
-#ifdef BUILD_XTRUETYPE
- XTrueTypeRegisterFontFileFunctions();
-#endif
#endif /* ifndef LOWMEMFTPT */
diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c
index 31b3983..e6bf4fe 100644
--- a/src/fontfile/fontdir.c
+++ b/src/fontfile/fontdir.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/lib/font/fontfile/fontdir.c,v 1.1.4.3.4.1 2004/03/04 17:47:11 eich Exp $ */
+/* $XdotOrg: xc/lib/font/fontfile/fontdir.c,v 1.2 2004/04/23 18:44:21 eich Exp $ */
/* $Xorg: fontdir.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */
/*
diff --git a/src/fontfile/fontfile.c b/src/fontfile/fontfile.c
index cb7bf80..77717ff 100644
--- a/src/fontfile/fontfile.c
+++ b/src/fontfile/fontfile.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/lib/font/fontfile/fontfile.c,v 1.1.4.4.2.1 2004/03/04 17:47:11 eich Exp $ */
+/* $XdotOrg: xc/lib/font/fontfile/fontfile.c,v 1.2 2004/04/23 18:44:21 eich Exp $ */
/* $Xorg: fontfile.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */
/*
diff --git a/src/fontfile/register.c b/src/fontfile/register.c
index 4bc7b8a..7c1c9d3 100644
--- a/src/fontfile/register.c
+++ b/src/fontfile/register.c
@@ -63,9 +63,6 @@ FontFileRegisterFpeFunctions(void)
#ifdef BUILD_FREETYPE
FreeTypeRegisterFontFileFunctions();
#endif
-#ifdef BUILD_XTRUETYPE
- XTrueTypeRegisterFontFileFunctions();
-#endif
#endif /* ifndef LOWMEMFTPT */
diff --git a/src/util/utilbitmap.c b/src/util/utilbitmap.c
index bd7c2cd..d832268 100644
--- a/src/util/utilbitmap.c
+++ b/src/util/utilbitmap.c
@@ -27,6 +27,8 @@ in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/lib/font/util/utilbitmap.c,v 1.4 2001/01/17 19:43:34 dawes Exp $ */
+#ifndef USE_INTERNAL_FREETYPE
+
/*
* Author: Keith Packard, MIT X Consortium
*/
@@ -181,3 +183,6 @@ RepadBitmap (char *pSrc, char *pDst,
}
return dstWidthBytes * height;
}
+
+#endif /* !USE_INTERNAL_FREETYPE */
+