summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-03-09 16:52:30 +0000
committerEgbert Eich <eich@suse.de>2004-03-09 16:52:30 +0000
commitde8c26ccbbf3bdfaeec7eedbbeb3d097c4d1431a (patch)
treee59e950460e031b64a02311daa4feb603f9abbf8
parent445926fa2ba8eb8baae42c11c58bab335b0992b5 (diff)
25. Updating Xcursor, Xrender, Xft (Egbert Eich).
-rw-r--r--COPYING22
-rw-r--r--INSTALL8
-rw-r--r--README11
-rw-r--r--include/X11/Xft/Xft.h14
-rw-r--r--include/X11/Xft/XftCompat.h7
-rw-r--r--src/xftcolor.c4
-rw-r--r--src/xftcore.c8
-rw-r--r--src/xftdbg.c4
-rw-r--r--src/xftdpy.c4
-rw-r--r--src/xftdraw.c4
-rw-r--r--src/xftextent.c2
-rw-r--r--src/xftfont.c2
-rw-r--r--src/xftfreetype.c69
-rw-r--r--src/xftglyphs.c31
-rw-r--r--src/xftinit.c4
-rw-r--r--src/xftint.h4
-rw-r--r--src/xftlist.c4
-rw-r--r--src/xftname.c4
-rw-r--r--src/xftrender.c39
-rw-r--r--src/xftstr.c4
-rw-r--r--src/xftswap.c4
-rw-r--r--src/xftxlfd.c10
-rw-r--r--xft-config.in7
-rw-r--r--xft.pc.in5
24 files changed, 170 insertions, 105 deletions
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..4ee13ed
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,22 @@
+$Id$
+
+Copyright © 2001,2003 Keith Packard
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Keith Packard not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Keith Packard makes no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..85a6759
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,8 @@
+Xft is built with the traditional configure script:
+
+ $ ./configure --prefix=/usr/X11R6
+
+This should generate valid Makefiles, then:
+
+ $ make
+ $ make install
diff --git a/README b/README
new file mode 100644
index 0000000..3a94937
--- /dev/null
+++ b/README
@@ -0,0 +1,11 @@
+ Xft
+ X FreeType library
+ Version 2.1.1
+ 2003-4-21
+
+This is the first stand alone release of Xft, a library that connects X
+applications with the FreeType font rasterization library. Xft uses
+fontconfig to locate fonts so it has no configuration files.
+
+Keith Packard
+keithp@keithp.com
diff --git a/include/X11/Xft/Xft.h b/include/X11/Xft/Xft.h
index 5fe5545..32af176 100644
--- a/include/X11/Xft/Xft.h
+++ b/include/X11/Xft/Xft.h
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/Xft.h,v 1.32 2003/02/25 21:57:53 dawes Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -25,15 +25,21 @@
#ifndef _XFT_H_
#define _XFT_H_
+/*
+ * Current Xft version number. This same number
+ * must appear in the Xft configure.ac file. Yes,
+ * it'a a pain to synchronize version numbers like this.
+ */
+
#define XFT_MAJOR 2
#define XFT_MINOR 1
-#define XFT_REVISION 0
+#define XFT_REVISION 2
#define XFT_VERSION ((XFT_MAJOR * 10000) + (XFT_MINOR * 100) + (XFT_REVISION))
#define XftVersion XFT_VERSION
#include <stdarg.h>
#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#include <fontconfig/fontconfig.h>
#include <X11/extensions/Xrender.h>
diff --git a/include/X11/Xft/XftCompat.h b/include/X11/Xft/XftCompat.h
index 4f07ec1..a6328a3 100644
--- a/include/X11/Xft/XftCompat.h
+++ b/include/X11/Xft/XftCompat.h
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/XftCompat.h,v 1.4 2002/05/24 05:54:02 keithp Exp $
+ * $Id$
*
- * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -111,6 +111,9 @@ typedef FcObjectSet XftObjectSet;
#define XftObjectSetDestroy FcObjectSetDestroy
#define XftObjectSetVaBuild FcObjectSetVaBuild
#define XftObjectSetBuild FcObjectSetBuild
+
+#define XftListFontsPatternObjects FcListFontsPatternObjects
+
#define XftFontSetMatch FcFontSetMatch
#define XftFontSetDestroy FcFontSetDestroy
diff --git a/src/xftcolor.c b/src/xftcolor.c
index 05faf0d..4d17045 100644
--- a/src/xftcolor.c
+++ b/src/xftcolor.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftcolor.c,v 1.1 2000/12/01 03:27:57 keithp Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftcore.c b/src/xftcore.c
index 7e3dc04..4c8470a 100644
--- a/src/xftcore.c
+++ b/src/xftcore.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftcore.c,v 1.13tsi Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -918,8 +918,10 @@ _XftGlyphDefault (Display *dpy, XftFont *public)
XftFontInt *font = (XftFontInt *) public;
FT_UInt missing[XFT_NMISSING];
int nmissing;
+ FcBool glyphs_loaded = FcFalse;
- XftFontCheckGlyph (dpy, public, FcTrue, 0, missing, &nmissing);
+ if (XftFontCheckGlyph (dpy, public, FcTrue, 0, missing, &nmissing))
+ glyphs_loaded = FcTrue;
if (nmissing)
XftFontLoadGlyphs (dpy, public, FcTrue, missing, nmissing);
return font->glyphs[0];
diff --git a/src/xftdbg.c b/src/xftdbg.c
index 8c0c13c..0c6e8c9 100644
--- a/src/xftdbg.c
+++ b/src/xftdbg.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftdbg.c,v 1.3 2001/03/31 01:57:20 keithp Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftdpy.c b/src/xftdpy.c
index 8384be5..0ec49d7 100644
--- a/src/xftdpy.c
+++ b/src/xftdpy.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftdpy.c,v 1.18 2002/10/02 07:02:32 keithp Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftdraw.c b/src/xftdraw.c
index b6d8542..3d49959 100644
--- a/src/xftdraw.c
+++ b/src/xftdraw.c
@@ -1,7 +1,7 @@
/*
* $XFree86: xc/lib/Xft/xftdraw.c,v 1.25 2002/10/11 17:53:02 keithp Exp $
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -177,6 +177,7 @@ XftDrawCreateBitmap (Display *dpy,
draw->colormap = 0;
draw->render.pict = 0;
draw->core.gc = 0;
+ draw->core.use_pixmap = 0;
draw->clip_type = XftClipTypeNone;
draw->subwindow_mode = ClipByChildren;
XftMemAlloc (XFT_MEM_DRAW, sizeof (XftDraw));
@@ -202,6 +203,7 @@ XftDrawCreateAlpha (Display *dpy,
draw->colormap = 0;
draw->render.pict = 0;
draw->core.gc = 0;
+ draw->core.use_pixmap = 0;
draw->clip_type = XftClipTypeNone;
draw->subwindow_mode = ClipByChildren;
XftMemAlloc (XFT_MEM_DRAW, sizeof (XftDraw));
diff --git a/src/xftextent.c b/src/xftextent.c
index 9e3e4e3..25e096e 100644
--- a/src/xftextent.c
+++ b/src/xftextent.c
@@ -1,7 +1,7 @@
/*
* $XFree86: xc/lib/Xft/xftextent.c,v 1.9 2002/10/11 17:53:02 keithp Exp $
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftfont.c b/src/xftfont.c
index de11c28..8c28d97 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -1,7 +1,7 @@
/*
* $XFree86: xc/lib/Xft/xftfont.c,v 1.9 2002/02/15 07:36:11 keithp Exp $
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftfreetype.c b/src/xftfreetype.c
index 2846065..40b14df 100644
--- a/src/xftfreetype.c
+++ b/src/xftfreetype.c
@@ -1,7 +1,7 @@
/*
* $XFree86: xc/lib/Xft/xftfreetype.c,v 1.29tsi Exp $
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -81,6 +81,7 @@ _XftGetFile (const FcChar8 *file, int id)
f->face = 0;
f->xsize = 0;
f->ysize = 0;
+ f->matrix.xx = f->matrix.xy = f->matrix.yx = f->matrix.yy = 0;
return f;
}
@@ -103,6 +104,7 @@ _XftGetFaceFile (FT_Face face)
f->face = face;
f->xsize = 0;
f->ysize = 0;
+ f->matrix.xx = f->matrix.xy = f->matrix.yx = f->matrix.yy = 0;
return f;
}
@@ -638,6 +640,7 @@ XftFontOpenInfo (Display *dpy,
int alloc_size;
int ascent, descent, height;
int i;
+ int num_glyphs;
if (!info)
return 0;
@@ -699,55 +702,16 @@ XftFontOpenInfo (Display *dpy,
case FC_RGBA_BGR:
case FC_RGBA_VRGB:
case FC_RGBA_VBGR:
- pf.depth = 32;
- pf.type = PictTypeDirect;
- pf.direct.alpha = 24;
- pf.direct.alphaMask = 0xff;
- pf.direct.red = 16;
- pf.direct.redMask = 0xff;
- pf.direct.green = 8;
- pf.direct.greenMask = 0xff;
- pf.direct.blue = 0;
- pf.direct.blueMask = 0xff;
- format = XRenderFindFormat(dpy,
- PictFormatType|
- PictFormatDepth|
- PictFormatAlpha|
- PictFormatAlphaMask|
- PictFormatRed|
- PictFormatRedMask|
- PictFormatGreen|
- PictFormatGreenMask|
- PictFormatBlue|
- PictFormatBlueMask,
- &pf, 0);
+ format = XRenderFindStandardFormat (dpy, PictStandardARGB32);
break;
default:
- pf.depth = 8;
- pf.type = PictTypeDirect;
- pf.direct.alpha = 0;
- pf.direct.alphaMask = 0xff;
- format = XRenderFindFormat(dpy,
- PictFormatType|
- PictFormatDepth|
- PictFormatAlpha|
- PictFormatAlphaMask,
- &pf, 0);
+ format = XRenderFindStandardFormat (dpy, PictStandardA8);
break;
}
}
else
{
- pf.depth = 1;
- pf.type = PictTypeDirect;
- pf.direct.alpha = 0;
- pf.direct.alphaMask = 0x1;
- format = XRenderFindFormat(dpy,
- PictFormatType|
- PictFormatDepth|
- PictFormatAlpha|
- PictFormatAlphaMask,
- &pf, 0);
+ format = XRenderFindStandardFormat (dpy, PictStandardA1);
}
if (!format)
@@ -769,8 +733,13 @@ XftFontOpenInfo (Display *dpy,
rehash_value = 0;
}
+ /*
+ * Sometimes the glyphs are numbered 1..n, other times 0..n-1,
+ * accept either numbering scheme by making room in the table
+ */
+ num_glyphs = face->num_glyphs + 1;
alloc_size = (sizeof (XftFontInt) +
- face->num_glyphs * sizeof (XftGlyph *) +
+ num_glyphs * sizeof (XftGlyph *) +
hash_value * sizeof (XftUcsHash));
font = malloc (alloc_size);
@@ -867,8 +836,8 @@ XftFontOpenInfo (Display *dpy,
* Per glyph information
*/
font->glyphs = (XftGlyph **) (font + 1);
- memset (font->glyphs, '\0', face->num_glyphs * sizeof (XftGlyph *));
- font->num_glyphs = face->num_glyphs;
+ memset (font->glyphs, '\0', num_glyphs * sizeof (XftGlyph *));
+ font->num_glyphs = num_glyphs;
/*
* Unicode hash table information
*/
@@ -929,9 +898,13 @@ XftFontCopy (Display *dpy, XftFont *public)
static void
XftFontDestroy (Display *dpy, XftFont *public)
{
- XftFontInt *font = (XftFontInt *) public;
- int i;
+ XftDisplayInfo *info = _XftDisplayInfoGet (dpy, False);
+ XftFontInt *font = (XftFontInt *) public;
+ int i;
+ /* note reduction in memory use */
+ if (info)
+ info->glyph_memory -= font->glyph_memory;
/* Clean up the info */
XftFontInfoEmpty (dpy, &font->info);
/* Free the glyphset */
diff --git a/src/xftglyphs.c b/src/xftglyphs.c
index 8fa633f..51fc816 100644
--- a/src/xftglyphs.c
+++ b/src/xftglyphs.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.23 2002/10/11 17:53:02 keithp Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -26,8 +26,7 @@
#include <stdlib.h>
#include <string.h>
#include "xftint.h"
-#include <ft2build.h>
-#include FT_OUTLINE_H
+#include <freetype/ftoutln.h>
#include <fontconfig/fcfreetype.h>
static const int filters[3][3] = {
@@ -535,9 +534,14 @@ XftFontLoadGlyphs (Display *dpy,
}
else
{
- xftg->bitmap = malloc (sizergba);
- if (xftg->bitmap)
- memcpy (xftg->bitmap, bufBitmapRgba, sizergba);
+ if (sizergba)
+ {
+ xftg->bitmap = malloc (sizergba);
+ if (xftg->bitmap)
+ memcpy (xftg->bitmap, bufBitmapRgba, sizergba);
+ }
+ else
+ xftg->bitmap = 0;
}
}
else
@@ -576,9 +580,14 @@ XftFontLoadGlyphs (Display *dpy,
}
else
{
- xftg->bitmap = malloc (size);
- if (xftg->bitmap)
- memcpy (xftg->bitmap, bufBitmap, size);
+ if (size)
+ {
+ xftg->bitmap = malloc (size);
+ if (xftg->bitmap)
+ memcpy (xftg->bitmap, bufBitmap, size);
+ }
+ else
+ xftg->bitmap = 0;
}
}
font->glyph_memory += xftg->glyph_memory;
@@ -735,7 +744,7 @@ XftCharIndex (Display *dpy,
offset = 1;
}
ent = ent + offset;
- if (ent > font->hash_value)
+ if (ent >= font->hash_value)
ent -= font->hash_value;
}
return font->hash_table[ent].glyph;
diff --git a/src/xftinit.c b/src/xftinit.c
index 5894725..7cb4bb9 100644
--- a/src/xftinit.c
+++ b/src/xftinit.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftinit.c,v 1.3 2002/02/15 07:36:11 keithp Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftint.h b/src/xftint.h
index 868360e..fb36041 100644
--- a/src/xftint.h
+++ b/src/xftint.h
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftint.h,v 1.36 2002/08/22 08:09:40 keithp Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftlist.c b/src/xftlist.c
index 3a4a312..3f7b390 100644
--- a/src/xftlist.c
+++ b/src/xftlist.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftlist.c,v 1.2 2000/12/07 23:57:28 keithp Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftname.c b/src/xftname.c
index 687006b..8981a8c 100644
--- a/src/xftname.c
+++ b/src/xftname.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftname.c,v 1.11 2002/02/15 07:36:11 keithp Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftrender.c b/src/xftrender.c
index 60ca222..f027eb4 100644
--- a/src/xftrender.c
+++ b/src/xftrender.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftrender.c,v 1.14 2002/10/11 17:53:02 keithp Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -386,6 +386,31 @@ XftCharSpecRender (Display *dpy,
free (glyphs);
}
+/*
+ * Choose which format to draw text in when drawing with fonts
+ * of different formats. The trick is that ARGB formats aren't
+ * compatible with A formats as PictOpAdd does the wrong thing, so
+ * fall back to an A format when presented with an ARGB and A format
+ */
+
+#define XftIsARGBFormat(a) ((a)->depth == 32)
+
+static XRenderPictFormat *
+XftPreferFormat (Display *dpy, XRenderPictFormat *a, XRenderPictFormat *b)
+{
+ XRenderPictFormat *prefer = 0;
+
+ if (a == b)
+ prefer = a;
+ else if (XftIsARGBFormat(a) != XftIsARGBFormat(b))
+ prefer = XRenderFindStandardFormat (dpy, PictStandardA8);
+ else if (a->depth > b->depth)
+ prefer = a;
+ else
+ prefer = b;
+ return prefer;
+}
+
void
XftGlyphFontSpecRender (Display *dpy,
int op,
@@ -399,6 +424,7 @@ XftGlyphFontSpecRender (Display *dpy,
int i, j;
XftFont *prevPublic;
XftFontInt *firstFont;
+ XRenderPictFormat *format;
FT_UInt missing[XFT_NMISSING];
int nmissing;
int n;
@@ -496,6 +522,7 @@ XftGlyphFontSpecRender (Display *dpy,
if (i == nglyphs)
goto bail2;
glyph = firstFont->glyphs[g];
+ format = firstFont->format;
x = glyphs[i].x + glyph->metrics.xOff;
y = glyphs[i].y + glyph->metrics.yOff;
prevPublic = 0;
@@ -516,6 +543,8 @@ XftGlyphFontSpecRender (Display *dpy,
if (pub != prevPublic || x != glyphs[i].x || y != glyphs[i].y)
{
prevPublic = pub;
+ if (font->format != format)
+ format = XftPreferFormat (dpy, font->format, format);
x = glyphs[i].x;
y = glyphs[i].y;
++nelt;
@@ -586,17 +615,17 @@ XftGlyphFontSpecRender (Display *dpy,
}
switch (width) {
case 1:
- XRenderCompositeText8 (dpy, op, src, dst, firstFont->format,
+ XRenderCompositeText8 (dpy, op, src, dst, format,
srcx, srcy, glyphs[0].x, glyphs[0].y,
elts, nelt);
break;
case 2:
- XRenderCompositeText16 (dpy, op, src, dst, firstFont->format,
+ XRenderCompositeText16 (dpy, op, src, dst, format,
srcx, srcy, glyphs[0].x, glyphs[0].y,
(XGlyphElt16 *) elts, nelt);
break;
case 4:
- XRenderCompositeText32 (dpy, op, src, dst, firstFont->format,
+ XRenderCompositeText32 (dpy, op, src, dst, format,
srcx, srcy, glyphs[0].x, glyphs[0].y,
(XGlyphElt32 *) elts, nelt);
break;
diff --git a/src/xftstr.c b/src/xftstr.c
index 33043cf..f6cbd35 100644
--- a/src/xftstr.c
+++ b/src/xftstr.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftstr.c,v 1.6 2001/04/01 14:00:01 tsi Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftswap.c b/src/xftswap.c
index ce813f5..f632a87 100644
--- a/src/xftswap.c
+++ b/src/xftswap.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: $
+ * $Id$
*
- * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/src/xftxlfd.c b/src/xftxlfd.c
index 84e394b..26a84c9 100644
--- a/src/xftxlfd.c
+++ b/src/xftxlfd.c
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftxlfd.c,v 1.9tsi Exp $
+ * $Id$
*
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -94,6 +94,8 @@ XftXlfdParse (const char *xlfd_orig, FcBool ignore_scalable, FcBool complete)
const char *family;
const char *weight_name;
const char *slant;
+ const char *registry;
+ const char *encoding;
char *save;
int pixel;
int point;
@@ -116,9 +118,9 @@ XftXlfdParse (const char *xlfd_orig, FcBool ignore_scalable, FcBool complete)
if (!(xlfd = XftGetInt (++xlfd, &resy))) return 0;
if (!(xlfd = strchr (/* spacing = */ ++xlfd, '-'))) return 0;
if (!(xlfd = strchr (/* average_width = */ ++xlfd, '-'))) return 0;
- if (!(xlfd = strchr (/* registry = */ ++xlfd, '-'))) return 0;
+ if (!(xlfd = strchr (registry = ++xlfd, '-'))) return 0;
/* make sure no fields follow this one */
- if ((xlfd = strchr (/* encoding = */ ++xlfd, '-'))) return 0;
+ if ((xlfd = strchr (encoding = ++xlfd, '-'))) return 0;
if (!pixel)
return 0;
diff --git a/xft-config.in b/xft-config.in
index 755ad83..549b73a 100644
--- a/xft-config.in
+++ b/xft-config.in
@@ -3,9 +3,8 @@
prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
-hardcode_libdir_flag_spec=@hardcode_libdir_flag_spec@
includedir="@includedir@"
-version="@PACKAGE_VERSION@"
+version="@VERSION@"
freetypelibs="@FREETYPE_LIBS@"
freetypecflags="@FREETYPE_CFLAGS@"
fontconfiglibs="@FONTCONFIG_LIBS@"
@@ -90,9 +89,9 @@ if test "$echo_cflags" = "yes" ; then
fi
if test "$echo_libs" = "yes" ; then
- libs="-lXft ${freetypelibs} ${fontconfiglibs} ${xrenderlibs}"
+ libs="-lXft -lX11 ${freetypelibs} ${fontconfiglibs} ${xrenderlibs}"
if test "${libdir}" != "/usr/lib" ; then
- echo ${hardcode_libdir_flag_spec} -L${libdir} $libs
+ echo -L${libdir} $libs
else
echo $libs
fi
diff --git a/xft.pc.in b/xft.pc.in
index 1ec7df8..4c1808b 100644
--- a/xft.pc.in
+++ b/xft.pc.in
@@ -1,7 +1,6 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-hardcode_libdir_flag_spec=@hardcode_libdir_flag_spec@
includedir=@includedir@
freetypelibs=@FREETYPE_LIBS@
freetypecflags=@FREETYPE_CFLAGS@
@@ -10,7 +9,7 @@ xrendercflags=@XRENDER_CFLAGS@
Name: Xft
Description: X FreeType library
-Version: @PACKAGE_VERSION@
+Version: @VERSION@
Requires: fontconfig
-Libs: ${hardcode_libdir_flag_spec} -L${libdir} -lXft ${freetypelibs} ${xrenderlibs}
+Libs: -L${libdir} -lXft -lX11 ${freetypelibs} ${xrenderlibs}
Cflags: -I${includedir} ${freetypecflags} ${xrendercflags}