Группа :: Система/X11
Пакет: xorg-x11
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: xorg-x11-6.8.2-Xft-2.1.7.patch
Скачать
Скачать
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/AUTHORS xorg-x11-6.8.x.99/xc/lib/Xft/AUTHORS
--- xorg-x11-6.8.2/xc/lib/Xft/AUTHORS 2004-04-23 22:43:41 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/AUTHORS 2005-06-25 13:48:46 +0400
@@ -1,4 +1,4 @@
-Keith Packard, of SuSE, HP, and XFree86
+Keith Packard, of SuSE and HP
Automake work by Noah Levitt
Frank Giessler - OS/2
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/autogen.sh xorg-x11-6.8.x.99/xc/lib/Xft/autogen.sh
--- xorg-x11-6.8.2/xc/lib/Xft/autogen.sh 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/autogen.sh 2005-06-25 13:48:47 +0400
@@ -1,3 +1,12 @@
#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
autoreconf -v --install || exit 1
-./configure --enable-maintainer-mode "$@"
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/ChangeLog xorg-x11-6.8.x.99/xc/lib/Xft/ChangeLog
--- xorg-x11-6.8.2/xc/lib/Xft/ChangeLog 2004-08-13 23:03:15 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/ChangeLog 2005-06-25 13:48:46 +0400
@@ -1,12 +1,163 @@
-Fri Aug 13 21:01:34 2004 Soeren Sandmann <sandmann@daimi.au.dk>
+2005-05-17 Egbert Eich <eich-at-freedesktop-dot-org>
+ * Xft.h:
+ gcc4 allows to check if sentinels are correct (a sentinel is the
+ terminating element in a varargs list). A sentinel needs to be
+ NULL, not 0 - which doesn't make a difference on 32bit but
+ matters on 64bit.
+ Furthermore it can be told that functions have a printf-like
+ format string and argument list so that they can verify that
+ both match.
+ To use these features certain attributes need to be set - which
+ are compiler specific. To do this we define macros which are
+ expanded depending on the compiler version.
+ For now we put those in include/Xfuncproto.h (the XFree86 DDX
+ layer contains a file compiler.h which however is not visible
+ outside the DDX) (Bugzilla #3268).
- * xftint.h (HAVE_FT_BITMAP_SIZE_Y_PPEM): Fix the build
+2005-05-01 Josh Triplett <josh@freedesktop.org>
+ * Makefile.am:
+ * configure.ac:
+ * xft-config.1.in:
+ Add Branden Robinson's xft-config manpage.
+
+2005-04-20 Branden Robinson <branden@deadbeast.net>
+
+ * Xft.3.in:
+ - Independently document each of the XftTextExtents* functions,
+ with particular attention to the units the "len" parameter is
+ measuring for each function. (Thanks to Matthew Allum for the
+ suggestion.)
+ - Tweak wording to not risk programmer inference that exposed
+ functions used internally are not for application usage.
+ - Don't escape hyphens when we don't really mean it (unescaped
+ hyphens are perfectly appropriate for hyphenated terms like
+ "mother-in-law" or "UTF-8".
+
+2005-04-20 Branden Robinson <branden@deadbeast.net>
+
+ * Xft.3.in:
+ - Flesh out with more details of constants, data types, and
+ functions used in the library. This continues to be a
+ work-in-progress.
+ - Move Xft 1.x compatibility interfaces to a new subsection of the
+ "COMPATBILITY" section.
+ - Add "HEADER FILE" section.
+ - Add "SEE ALSO" section.
+
+2005-04-02 Branden Robinson <branden@deadbeast.net>
+ * Xft.3.in:
+ Improve roff markup in many respects:
+ - Don't define a macro we don't use (TQ).
+ - Eliminate gratuitous blank lines.
+ - End sentences with newlines so that roff knows when to use
+ intersentence spacing.
+ - Consistently use boldface when referring to the Xft library name
+ and data types.
+ - Mark up function prototypes more legibly.
+ - Remove extraneous whitespace characters at ends of lines.
+ Make editorial changes to improve comprehensibility:
+ - Delcare manpage name in .TH macro using mixed case.
+ - Rename "DATATYPES" section to "DATA TYPES".
+ - Make various wording changes and clarifications.
+ - Consistently refer to the RENDER extension as the "X Rendering
+ Extension".
+
+2005-04-02 Branden Robinson <branden@deadbeast.net>
+
+ * Makefile.am:
+ Remove $(man_MANS) from EXTRA_DIST; the Xft.3 manpage is generated
+ by the ./configure script, so there is no need to ship it as part
+ of the distribution tarball.
+ Whitespace police.
+
+2005-03-29 Keith Packard <keithp@keithp.com>
+
+ * README:
+ * Xft.h:
+ * configure.ac:
+ Update for version 2.1.7
+
+2005-03-01 Keith Packard <keithp@keithp.com>
+
+ * xftdpy.c: (_XftDisplayInfoGet), (XftDefaultSubstitute):
+ Avoid calling any Render functions when Render is missing (#137)
+
+ * xftglyphs.c: (XftFontLoadGlyphs):
+ Only clip to bounding box when FC_CHARCELL is specified.
+ Only fix glyph spacing when FC_MONO is specified.
+
+2005-02-28 Keith Packard <keithp@keithp.com>
+
+ * configure.ac:
+ * xftdpy.c: (_XftDefaultInit), (XftDefaultSubstitute):
+ * xftfreetype.c: (XftFontInfoFill), (XftFontOpenInfo):
+ * xftglyphs.c: (XftFontLoadGlyphs):
+ * xftint.h:
+ Add support for artificial emboldening of glyphs through
+ the FT_GlyphSlot_Embolden API when it is available.
+
+ * xftextent.c: (XftGlyphExtents):
+ Optimize one glyph extents case (it happens a *lot*).
+ (Ross Burton)
+
+2004-11-28 James Henstridge <james@jamesh.id.au>
+
+ * xftfreetype.c (_XftReleaseFile): add parentheses in the
+ expression in the second argument to XftMemFree so that it is
+ interpreted correctly.
+
+2004-09-05 Keith Packard <keithp@keithp.com>
+
+ * configure.ac:
+ Move AC_CONFIG_AUX_DIR above AM_INIT_AUTOMAKE to make
+ automake 1.9 happy
+
Fri Aug 13 19:47:12 2004 Soeren Sandmann <sandmann@redhat.com>
* xftint.h: Make HAVE_FT_BITMAP_SIZE_Y_PPEM conditional on the
FreeType version instead of proping it. This way it will work
with the monolithic version too. #1062, Patch by Owen Taylor.
+
+2004-08-03 Keith Packard <keithp@keithp.com>
+
+ * xftfreetype.c: (_XftReleaseFile):
+ Called strlen with (f->file) without checking for NULL (which
+ happens when directly using FT_Face objects).
+
+2004-04-14 Keith Packard <keithp@keithp.com>
+
+ * AUTHORS:
+ * Makefile.am:
+ * Xft-def.cpp:
+ * Xft.3.in:
+ * Xft.h:
+ * XftCompat.h:
+ * configure.ac:
+ * xftcolor.c:
+ * xftcore.c:
+ * xftdbg.c:
+ * xftdpy.c:
+ * xftdraw.c:
+ * xftextent.c:
+ * xftfont.c:
+ * xftfreetype.c: (XftFontOpenInfo):
+ * xftglyphs.c:
+ * xftinit.c:
+ * xftint.h:
+ * xftlist.c:
+ * xftname.c:
+ * xftrender.c:
+ * xftstr.c:
+ * xftswap.c:
+ * xftxlfd.c:
+ Regularize #include usage so that all includes
+ happen in xftint.h. This allows conditional inclusion
+ of system headers like string.h/strings.h
+
+ Add GCC warnings on GCC systems.
+
+ Fix CVS Id strings
2004-03-22 Keith Packard <keithp@keithp.com>
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/config.h xorg-x11-6.8.x.99/xc/lib/Xft/config.h
--- xorg-x11-6.8.2/xc/lib/Xft/config.h 1970-01-01 03:00:00 +0300
+++ xorg-x11-6.8.x.99/xc/lib/Xft/config.h 2005-06-25 14:56:41 +0400
@@ -0,0 +1,77 @@
+/* config.h. Generated by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* FT_Bitmap_Size structure includes y_ppem field */
+#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1
+
+/* Define to 1 if you have the `FT_Get_BDF_Property' function. */
+#define HAVE_FT_GET_BDF_PROPERTY 1
+
+/* Define to 1 if you have the `FT_Get_Next_Char' function. */
+#define HAVE_FT_GET_NEXT_CHAR 1
+
+/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */
+#define HAVE_FT_GET_PS_FONT_INFO 1
+
+/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */
+#define HAVE_FT_HAS_PS_GLYPH_NAMES 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <X11/extensions/Xrender.h> header file. */
+#define HAVE_X11_EXTENSIONS_XRENDER_H 1
+
+/* Define to 1 if you have the `XRenderFindStandardFormat' function. */
+#define HAVE_XRENDERFINDSTANDARDFORMAT 1
+
+/* Name of package */
+#define PACKAGE "libXft"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "keithp@keithp.com"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "libXft"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "libXft 2.1.7"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "libXft"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "2.1.7"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "2.1.7"
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/configure.ac xorg-x11-6.8.x.99/xc/lib/Xft/configure.ac
--- xorg-x11-6.8.2/xc/lib/Xft/configure.ac 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/configure.ac 2005-06-25 13:48:47 +0400
@@ -1,5 +1,5 @@
dnl
-dnl $Id$
+dnl $Id: configure.ac,v 1.3 2005/06/24 22:43:20 alanc Exp $
dnl
dnl Copyright б╘ 2003 Keith Packard, Noah Levitt
dnl
@@ -32,13 +32,13 @@
dnl not possible to extract the version number here from Xft.h
dnl Please bump the minor library number at each release as well.
dnl
-AC_INIT(libXft, 2.1.6, [keithp@keithp.com], libXft)
+AC_INIT(libXft, 2.1.7, [keithp@keithp.com], libXft)
+AC_CONFIG_AUX_DIR(.)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
-AC_CONFIG_AUX_DIR(.)
# checks for progs
AC_PROG_CC
@@ -100,7 +100,7 @@
fontconfig_save_cflags="$CFLAGS"
LIBS="$LIBS $FREETYPE_LIBS"
CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
-AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names)
+AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_GlyphSlot_Embolden)
AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
HAVE_FT_BITMAP_SIZE_Y_PPEM=1,
HAVE_FT_BITMAP_SIZE_Y_PPEM=0,
@@ -116,8 +116,18 @@
VERSION=$PACKAGE_VERSION;
fi
+WARN_CFLAGS=""
+
+if test "x$GCC" = "xyes"; then
+ WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wnested-externs -fno-strict-aliasing"
+fi
+AC_SUBST(WARN_CFLAGS)
+
AC_OUTPUT([Makefile
xft.pc
xft-config
+ xft-config.1
Xft.3])
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/COPYING xorg-x11-6.8.x.99/xc/lib/Xft/COPYING
--- xorg-x11-6.8.2/xc/lib/Xft/COPYING 2004-04-23 22:43:41 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/COPYING 2005-06-25 13:48:46 +0400
@@ -1,4 +1,4 @@
-$Id$
+$Id: COPYING,v 1.3 2005/06/24 22:43:20 alanc Exp $
Copyright б╘ 2001,2003 Keith Packard
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/Imakefile xorg-x11-6.8.x.99/xc/lib/Xft/Imakefile
--- xorg-x11-6.8.2/xc/lib/Xft/Imakefile 2004-04-23 22:43:41 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/Imakefile 2005-06-25 15:11:24 +0400
@@ -45,9 +45,9 @@
WARNINGS=-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
#endif
INCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) -I$(XBUILDINCDIR) $(WARNINGS)
-DEFINES=$(FREETYPE2DEFINES) $(RENDERDEFINES) -DXFREE86_FT2
+DEFINES=$(FREETYPE2DEFINES) $(RENDERDEFINES) -DXFREE86_FT2 -DHAVE_CONFIG_H
-XFT_REVISION=2
+XFT_REVISION=7
FREETYPE_LIBS=$(FREETYPE2LIB)
FREETYPE_CFLAGS=$(FREETYPE2INCLUDES)
@@ -115,29 +115,30 @@
SpecialCObjectRule(sharedlib,NullParameter,$(SHLIBDEF))
#endif
-MANSUFFIX = $(LIBMANSUFFIX)
-InstallManPage(Xft,$(LIBMANDIR))
-DependTarget()
-
-all:: xft-config.script
-
-xft-config.script: xft-config.in
- RemoveFile($@)
- sh config/config-subst $(SUBSTVARS) < xft-config.in > $@
+#define ConfigSubst(file, old_suffix, new_suffix) @@\
+ @@\
+all:: Concat(file,new_suffix) @@\
+ @@\
+Concat(file,new_suffix): Concat(file,old_suffix) @@\
+ RemoveFile($@) @@\
+ sh config/config-subst $(SUBSTVARS) < Concat(file,old_suffix) > $@ @@\
+ @@\
+clean:: @@\
+ RemoveFile(Concat(file,new_suffix))
+XCOMM Create xft-config.script from xft-config.in
+ConfigSubst(xft-config,.in,.script)
InstallScript(xft-config,$(BINDIR))
-clean::
- RemoveFile(xft-config.script)
-
-all:: xft.pc
+XCOMM Create xft.pc from xft.pc.in
+ConfigSubst(xft.pc,.in,/*none*/)
+InstallNonExecFile(xft.pc,$(PKGCONFIGDIR))
+
+XCOMM Create man pages from .*.in files
+ConfigSubst(xft-config,.1.in,.man)
+ConfigSubst(Xft,.3.in,.man)
-xft.pc: xft.pc.in
- RemoveFile($@)
- sh config/config-subst $(SUBSTVARS) < xft.pc.in > $@
-
-InstallNonExecFile(xft.pc,$(PKGCONFIGDIR))
-
-clean::
- RemoveFile(xft.pc)
+InstallGenManPage(xft-config,$(MANDIR),$(MANSUFFIX))
+InstallGenManPage(Xft,$(LIBMANDIR),$(LIBMANSUFFIX))
+DependTarget()
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/Makefile.am xorg-x11-6.8.x.99/xc/lib/Xft/Makefile.am
--- xorg-x11-6.8.2/xc/lib/Xft/Makefile.am 2004-04-23 22:43:41 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/Makefile.am 2005-06-25 13:48:46 +0400
@@ -1,8 +1,8 @@
-#
-# $Id$
-#
+#
+# $Id: Makefile.am,v 1.3 2005/06/24 22:43:20 alanc Exp $
+#
# Copyright б╘ 2003 Keith Packard, Noah Levitt
-#
+#
# 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
@@ -12,7 +12,7 @@
# 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
@@ -23,9 +23,10 @@
bin_SCRIPTS = xft-config
-man_MANS = Xft.3
+man_MANS = Xft.3 xft-config.1
-AM_CFLAGS = $(FONTCONFIG_CFLAGS) $(FREETYPE_CFLAGS) $(XRENDER_CFLAGS)
+AM_CFLAGS = $(FONTCONFIG_CFLAGS) $(FREETYPE_CFLAGS) $(XRENDER_CFLAGS) \
+ $(WARN_CFLAGS)
lib_LTLIBRARIES = libXft.la
@@ -55,10 +56,9 @@
libXft_la_LDFLAGS = -version-number 2:1:2 -no-undefined
libXftincludedir = $(includedir)/X11/Xft
-libXftinclude_HEADERS = Xft.h XftCompat.h
+libXftinclude_HEADERS = Xft.h XftCompat.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xft.pc
-EXTRA_DIST = xft-config.in xft.pc.in Xft.3.in $(man_MANS) autogen.sh
-
+EXTRA_DIST = xft-config.in xft-config.1.in xft.pc.in Xft.3.in autogen.sh
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/README xorg-x11-6.8.x.99/xc/lib/Xft/README
--- xorg-x11-6.8.2/xc/lib/Xft/README 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/README 2005-06-25 13:48:46 +0400
@@ -1,12 +1,36 @@
- Xft
- X FreeType library
- Version 2.1.3
- 2003-3-10
+ Xft
+ X FreeType library
+ Version 2.1.7
+ 2005-3-29
Xft version 2.1 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.
+Version 2.1.7
+
+Change FC_CHARCELL and FC_MONO interpretation. FC_MONO no longer clips
+glyphs to charcell, you must specify FC_CHARCELL for that.
+
+Add support for FT_GlyphSlot_Embolden where it exists (which it usually
+doesn't).
+
+Avoid crashing when using FT_Face objects.
+
+Version 2.1.6
+
+Deal with broken FreeType 2.1.7 BDF/PCF loaders by trying both y_ppem/x_ppem
+and width/height values.
+
+Version 2.1.5
+
+Left some #warnings from testing in the 2.1.4 release. Spin again.
+
+Version 2.1.4
+
+Work with older versions of Fontconfig by using various pattern elements
+only when defined.
+
Version 2.1.3
Change Freetype includes to new syntax.
@@ -15,5 +39,27 @@
Support fontconfig 2.2 release which doesn't include FC_HINT_STYLE.
+To release a version of this library:
+
+ 1. Update the version numbers
+ configure.ac
+ Xft.h
+ 2. Fix the README
+ Change version number
+ Set the date
+ 3. Commit those changes
+ 4. rebuild the configuration files with autogen.sh
+ sh autogen.sh --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
+ 5. make distcheck
+ 6. tag the tree
+ cvs tag Xft-2_1_xx
+ 7. Copy Xft-2.1.xx.tar.gz and Xft-2.1.xx.tar.bz2 to
+ freedesktop.org:/srv/xlibs.freedesktop.org/www/release
+ 8. Compute md5sums for release files:
+ md5sum Xft-2.1.xx.tar.gz Xft-2.1.xx.tar.bz2
+ 9. Post a note to xorg@freedesktop.org. Include the md5sums.
+ gpg sign the message.
+
+
Keith Packard
keithp@keithp.com
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/Xft.3.in xorg-x11-6.8.x.99/xc/lib/Xft/Xft.3.in
--- xorg-x11-6.8.2/xc/lib/Xft/Xft.3.in 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/Xft.3.in 2005-06-25 13:48:46 +0400
@@ -1,5 +1,5 @@
.\"
-.\" $Id$
+.\" $Id: Xft.3.in,v 1.3 2005/06/24 22:43:20 alanc Exp $
.\"
.\" Copyright б╘ 2000 Keith Packard
.\"
@@ -21,121 +21,827 @@
.\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-.TH XFT 3 "Version @VERSION@" "Xft"
-
+.TH Xft 3 "Version @VERSION@" "Xft"
.SH NAME
Xft \- X FreeType interface library
-
.SH DESCRIPTION
.B Xft
is a simple library designed to interface the FreeType rasterizer with the X
-Rendering Extension. This manual page barely scratches the surface of this
-library.
-
-.SH DATATYPES
-
-.B XftPattern
-holds a set of names with associated value lists; each name refers to a
-property of a font. XftPatterns are used as inputs to the matching code as
-well as holding information about specific fonts.
-
+Rendering Extension.
+This manual page barely scratches the surface of this library.
+.SH "HEADER FILE"
+.B #include <X11/Xft/Xft.h>
+.SH CONSTANTS
+.TP
+.B XFT_MAJOR
+is the major version number of
+.BR Xft .
+.TP
+.B XFT_MINOR
+is the minor version number of
+.BR Xft .
+.TP
+.B XFT_REVISION
+is the revision number of
+.BR Xft .
+.TP
+.B XFT_VERSION
+is
+.B XFT_MAJOR
+times 10000 (ten thousand), plus
+.B XFT_MINOR
+times 100, plus
+.BR XFT_REVISION .
+.TP
+.B XftVersion
+is an alias for
+.BR XFT_VERSION .
+.PP
+The following example illustrates how
+.BR Xft 's
+version constants might be used:
+.nf
+ #if (XFT_VERSION >= 20107)
+ (void) puts("Version 2.1.7 or later of the Xft library is in"
+ " use.");
+ #else
+ (void) printf("Insufficient version of Xft (%d.%d.%d) installed;
+ " need at least version 2.1.7.\(rsn", XFT_MAJOR,
+ XFT_MINOR,
+ XFT_REVISION);
+ #endif
+.fi
+.\" I don't understand what these are for. -- BR, 2005-04-02
+.\" XFT_CORE used in xftname.c
+.\" XFT_RENDER used in xftdpy.c, xftfreetype.c, xftname.c
+.\" XFT_XLFD used in xftname.c, xftxlfd.c
+.\" XFT_MAX_GLYPH_MEMORY used in xftdpy.c, xftfreetype.c
+.\" XFT_MAX_UNREF_FONTS used in xftdpy.c
+.\" XFT_NMISSING used in xftcore.c, xftextent.c, xftglyphs.c,
+.\" xftrender.c
+.SH "DATA TYPES"
+.TP
.B XftFont
-contains general font metrics and a pointer to either the core XFontStruct
-data or a structure holding FreeType and X Render Extension data.
-
-.B XftFontStruct
-contains information about FreeType fonts used with the X Render Extension.
-
-.B XftFontSet
-contains a list of XftPatterns. Internally Xft uses this data structure to
-hold sets of fonts. Externally, Xft returns the results of listing fonts in
-this format.
-
-.B XftObjectSet
-holds a set of names and is used to specify which fields from fonts are
-placed in the the list of returned patterns when listing fonts.
-
+.nf
+typedef struct _XftFont {
+ int ascent;
+ int descent;
+ int height;
+ int max_advance_width;
+ FcCharSet *charset;
+ FcPattern *pattern;
+} XftFont;
+.fi
+An
+.B XftFont
+is the primary data structure of interest to programmers using
+.BR Xft ;
+it contains general font metrics and pointers to the Fontconfig
+character set and pattern associated with the font.
+The
+.B FcCharSet
+and
+.B FcPattern
+data types are defined by the Fontconfig library.
+.TP
+.B ""
+.BR XftFont s
+are populated with any of
+.BR XftFontOpen (),
+.BR XftFontOpenName (),
+.BR XftFontOpenXlfd (),
+.BR XftFontOpenInfo (),
+or
+.BR XftFontOpenPattern ().
+.BR XftFontCopy ()
+is used to duplicate
+.BR XftFont s,
+and
+.BR XftFontClose ()
+is used to mark an
+.B XftFont
+as unused.
+.BR XftFont s
+are internally allocated, reference-counted, and freed by
+.BR Xft ;
+the programmer does not ordinarily need to allocate or free storage
+for them.
+.TP
+.B ""
+.BR XftDrawGlyphs (),
+the
+.BR XftDrawString *()
+family,
+.BR XftDrawCharSpec (),
+and
+.BR XftDrawGlyphSpec ()
+use
+.BR XftFont s
+to render text to an
+.B XftDraw
+object, which may correspond to either a core X drawable or an X
+Rendering Extension drawable.
+.TP
+.B ""
+.BR XftGlyphExtents ()
+and the
+.BR XftTextExtents *()
+family are used to determine the extents (maximum dimensions) of an
+.BR XftFont .
+.TP
+.B ""
+An
+.BR XftFont 's
+glyph or character coverage can be determined with
+.BR XftFontCheckGlyph ()
+or
+.BR XftCharExists ().
+.BR XftCharIndex ()
+returns the
+.BR XftFont -specific
+character index corresponding to a given Unicode codepoint.
+.TP
+.B ""
+.BR XftGlyphRender (),
+.BR XftGlyphSpecRender (),
+.BR XftCharSpecRender (),
+and the
+.BR XftTextRender *()
+family use
+.BR XftFont s
+to draw into X Rendering Extension
+.B Picture
+structures.
+.B Note:
+.BR XftDrawGlyphs (),
+the
+.BR XftDrawString *()
+family,
+.BR XftDrawCharSpec (),
+and
+.BR XftDrawGlyphSpec ()
+provide a means of rendering fonts that is independent of the
+availability of the X Rendering Extension on the X server.
+.\" I'm not sure what these are for; they're used internally, but why
+.\" would any external users want them? -- BR, 2005-04-02
+.\" .BR XftLockFace()
+.\" .BR XftUnlockFace()
+.TP
+.B XftFontInfo
+is an opaque object that stores information about a font.
+.B XftFontInfo
+structures are created with
+.BR XftFontInfoCreate (),
+freed with
+.BR XftFontInfoDestroy (),
+and compared with
+.BR XftFontInfoEqual ().
+.B XftFontInfo
+objects are internally allocated and freed by
+.BR Xft ;
+the programmer does not ordinarily need to allocate or free storage
+for them.
+.TP
+.B ""
+Each
+.B XftFontInfo
+structure in use is associated with a unique identifier, which can be
+retrieved with
+.BR XftFontInfoHash ().
+An
+.B XftFont
+can be opened based on
+.B XftFontInfo
+data with
+.BR XftFontOpenInfo ().
+.TP
+.B XftColor
+.nf
+typedef struct _XftColor {
+ unsigned long pixel;
+ XRenderColor color;
+} XftColor;
+.fi
+An
+.B XftColor
+object permits text and other items to be rendered in a particular
+color (or the closest approximation offered by the X visual in use).
+The
+.B XRenderColor
+data type is defined by the X Render Extension library.
+.TP
+.B ""
+.BR XftColorAllocName ()
+and
+.BR XftColorAllocValue ()
+request a color allocation from the X server (if necessary) and
+initialize the members of
+.BR XftColor .
+.BR XftColorFree ()
+instructs the X server to free the color currently allocated for an
+.BR XftColor .
+.TP
+.B ""
+One an
+.B XftColor
+has been initialized,
+.BR XftDrawSrcPicture (),
+.BR XftDrawGlyphs (),
+the
+.BR XftDrawString *()
+family,
+.BR XftDrawCharSpec (),
+.BR XftDrawCharFontSpec (),
+.BR XftDrawGlyphSpec (),
+.BR XftDrawGlyphFontSpec (),
+and
+.BR XftDrawRect ()
+may be used to draw various objects using it.
+.TP
.B XftDraw
is an opaque object which holds information used to render to an X drawable
-using either core protocol or the X Rendering extension.
-
+using either the core protocol or the X Rendering extension.
+.TP
+.B ""
+.B XftDraw
+objects are created with any of
+.BR XftDrawCreate ()
+(which associates an
+.B XftDraw
+with an existing X drawable),
+.BR XftDrawCreateBitmap (),
+or
+.BR XftDrawCreateAlpha (),
+and destroyed with
+.BR XftDrawDestroy ().
+The X drawable associated with an
+.B XftDraw
+can be changed with
+.BR XftDrawChange ().
+.BR XftDraw s
+are internally allocated and freed by
+.BR Xft ;
+the programmer does not ordinarily need to allocate or free storage
+for them.
+.TP
+.B ""
+The X
+.BR Display ,
+.BR Drawable ,
+.BR Colormap ,
+and
+.BR Visual
+of an
+.B XftDraw
+can be queried with
+.BR XftDrawDisplay (),
+.BR XftDrawDrawable (),
+.BR XftDrawColormap (),
+and
+.BR XftDrawVisual (),
+respectively.
+The X Rendering Extension
+.B Picture
+associated with an
+.B XftDraw
+is returned by
+.BR XftDrawPicture ().
+.\" XftDrawSrcPicture
+.\" XftDrawGlyphs
+.\" XftDrawString*
+.\" XftDrawCharSpec
+.\" XftDrawCharFontSpec
+.\" XftDrawGlyphSpec
+.\" XftDrawGlyphFontSpec
+.\" XftDrawRect
+.\" XftDrawSetClip
+.\" XftDrawSetClipRectangles
+.\" XftDrawSetSubwindowMode
+.TP
+.B XftCharSpec
+.nf
+typedef struct _XftCharSpec {
+ FcChar32 ucs4;
+ short x;
+ short y;
+} XftCharSpec;
+.fi
+.TP
+.B ""
+The
+.B FcChar32
+data type is defined by the Fontconfig library.
+.\" XftDrawCharSpec
+.\" XftCharSpecRender
+.TP
+.B XftCharFontSpec
+.nf
+typedef struct _XftCharFontSpec {
+ XftFont *font;
+ FcChar32 ucs4;
+ short x;
+ short y;
+} XftCharFontSpec;
+.fi
+.TP
+.B ""
+The
+.B FcChar32
+data type is defined by the Fontconfig library.
+.\" XftDrawCharFontSpec
+.\" XftCharFontSpecRender
+.TP
+.B XftGlyphSpec
+.nf
+typedef struct _XftGlyphSpec {
+ FT_UInt glyph;
+ short x;
+ short y;
+} XftGlyphSpec;
+.fi
+.TP
+.B ""
+The
+.B FT_UInt
+data type is defined by the FreeType library.
+.\" XftDrawGlyphSpec
+.\" XftGlyphSpecRender
+.TP
+.B XftGlyphFontSpec
+.nf
+typedef struct _XftGlyphFontSpec {
+ XftFont *font;
+ FT_UInt glyph;
+ short x;
+ short y;
+} XftGlyphFontSpec;
+.fi
+.TP
+.B ""
+The
+.B FT_UInt
+data type is defined by the FreeType library.
+.\" XftDrawGlyphFontSpec
+.\" XftGlyphFontSpecRender
.SH FUNCTIONS
+.SS "Opening and Matching Fonts"
.nf
-XftFont *
-XftFontOpen (Display *dpy, int screen, ...);
+\fBXftFont *\fR
+\fBXftFontOpen (Display *\fIdpy\fB,\fR
+\fB int \fIscreen\fB,\fR
+\fB ...);\fR\fR
.fi
.B XftFontOpen
-takes a list of pattern elements of the form (field, type, value) terminated
-with a NULL, matches that pattern against the available fonts and opens the
-matching font.
+takes a list of pattern element triples of the form
+.IR field , " type" , " value"
+(terminated with a NULL), matches that pattern against the available fonts,
+and opens the matching font, sizing it correctly for screen number
+.I screen
+on display
+.IR dpy .
+The
+.B Display
+data type is defined by the X11 library.
+Returns NULL if no match is found.
.PP
Example:
-.br
- font = XftFontOpen (dpy, scr,
- XFT_FAMILY, XftTypeString, "charter",
- XFT_SIZE, XftTypeDouble, 12.0,
- NULL);
-.PP
-This opens the charter font at 12 points. The point size is automatically
-converted to the correct pixel size based on the resolution of the monitor.
+.nf
+ font = XftFontOpen (dpy, screen,
+ XFT_FAMILY, XftTypeString, "charter",
+ XFT_SIZE, XftTypeDouble, 12.0,
+ NULL);
+.fi
+This opens the \(lqcharter\(rq font at 12 points.
+The point size is automatically converted to the correct pixel size based
+on the resolution of the monitor.
+.PP
+.nf
+\fBXftFont *\fR
+\fBXftFontOpenName (Display *\fIdpy\fB,\fR
+\fB int \fIscreen\fB,\fR
+\fB unsigned char *\fIname\fB);\fR
+.fi
+.B XftFontOpenName
+behaves as
+.B XftFontOpen
+does, except that it takes a Fontconfig pattern string (which is passed to
+the Fontconfig library's
+.BR FcNameParse ()
+function).
.PP
.nf
-void
-XftTextExtents8 (Display *dpy,
- XftFont *font,
- unsigned char *string,
- int len,
- XGlyphInfo *extents);
+\fBXftFont *\fR
+\fBXftFontOpenXlfd (Display *\fIdpy\fB,\fR
+\fB int \fIscreen\fB,\fR
+\fB unsigned char *\fIxlfd\fB)\fR
+.fi
+.B XftFontOpenXlfd
+behaves as
+.B XftFontOpen
+does, except that it takes a string containing an X Logical Font
+Description (XLFD).
+.PP
+.nf
+\fBFcPattern *\fR
+\fBXftFontMatch (Display *\fIdpy\fB,\fR
+\fB int \fIscreen\fB,\fR
+\fB FcPattern *\fIpattern\fB,\fR
+\fB FcResult *\fIresult\fB);\fR
+.fi
+Also used internally by the
+.BR XftFontOpen *
+functions,
+.B XftFontMatch
+can also be used directly to determine the Fontconfig font pattern
+resulting from an Xft font open request.
+The
+.B FcPattern
+and
+.B FcResult
+data types are defined by the Fontconfig library.
+.SS "Determining the Pixel Extents of a Text String"
+.nf
+\fBvoid\fR
+\fBXftTextExtents8 (Display *\fIdpy\fB,\fR
+\fB XftFont *\fIfont\fB,\fR
+\fB FcChar8 *\fIstring\fB,\fR
+\fB int \fIlen\fB,\fR
+\fB XGlyphInfo *\fIextents\fB);\fR
.fi
.B XftTextExtents8
-computes the pixel extents of "string" when drawn with "font".
+computes the pixel extents on display
+.I dpy
+of no more than
+.I len
+glyphs of a
+.I string
+consisting of eight-bit characters when drawn with
+.IR font ,
+storing them in
+.IR extents .
+The
+.B FcChar8
+data type is defined by the Fontconfig library, and the
+.B XGlyphInfo
+data type is defined by the X Rendering Extension library.
+.PP
+.nf
+\fBvoid\fR
+\fBXftTextExtents16 (Display *\fIdpy\fB,\fR
+\fB XftFont *\fIfont\fB,\fR
+\fB FcChar16 *\fIstring\fB,\fR
+\fB int \fIlen\fB,\fR
+\fB XGlyphInfo *\fIextents\fB);\fR
+.fi
+.B XftTextExtents16
+computes the pixel extents on display
+.I dpy
+of no more than
+.I len
+glyphs of a
+.I string
+consisting of sixteen-bit characters when drawn with
+.IR font ,
+storing them in
+.IR extents .
+The
+.B FcChar16
+data type is defined by the Fontconfig library, and the
+.B XGlyphInfo
+data type is defined by the X Rendering Extension library.
+.PP
+.nf
+\fBvoid\fR
+\fBXftTextExtents32 (Display *\fIdpy\fB,\fR
+\fB XftFont *\fIfont\fB,\fR
+\fB FcChar32 *\fIstring\fB,\fR
+\fB int \fIlen\fB,\fR
+\fB XGlyphInfo *\fIextents\fB);\fR
+.fi
+.B XftTextExtents32
+computes the pixel extents on display
+.I dpy
+of no more than
+.I len
+glyphs of a
+.I string
+consisting of thirty-two-bit characters when drawn with
+.IR font ,
+storing them in
+.IR extents .
+The
+.B FcChar32
+data type is defined by the Fontconfig library, and the
+.B XGlyphInfo
+data type is defined by the X Rendering Extension library.
.PP
.nf
-XftDraw *
-XftDrawCreate (Display *dpy,
- Drawable drawable,
- Visual *visual,
- Colormap colormap);
+\fBvoid\fR
+\fBXftTextExtentsUtf8 (Display *\fIdpy\fB,\fR
+\fB XftFont *\fIfont\fB,\fR
+\fB FcChar8 *\fIstring\fB,\fR
+\fB int \fIlen\fB,\fR
+\fB XGlyphInfo *\fIextents\fB);\fR
+.fi
+.B XftTextExtentsUtf8
+computes the pixel extents on display
+.I dpy
+of no more than
+.I len
+bytes of a UTF-8 encoded
+.I string
+when drawn with
+.IR font ,
+storing them in
+.IR extents .
+The
+.B XGlyphInfo
+data type is defined by the X Rendering Extension library.
+.PP
+.nf
+\fBvoid\fR
+\fBXftTextExtentsUtf16 (Display *\fIdpy\fB,\fR
+\fB XftFont *\fIfont\fB,\fR
+\fB FcChar8 *\fIstring\fB,\fR
+\fB FcEndian \fIendian\fB,\fR
+\fB int \fIlen\fB,\fR
+\fB XGlyphInfo *\fIextents\fB);\fR
+.fi
+.B XftTextExtentsUtf16
+computes the pixel extents on display
+.I dpy
+of no more than
+.I len
+bytes of a UTF-16LE- or UTF-16BE-encoded
+.I string
+when drawn with
+.IR font ,
+storing them in
+.IR extents .
+The endianness of
+.I string
+must be specified in
+.IR endian .
+The
+.B FcEndian
+data type is defined by the Fontconfig library, and the
+.B XGlyphInfo
+data type is defined by the X Rendering Extension library.
+.PP
+.nf
+\fBvoid\fR
+\fBXftGlyphExtents (Display *\fIdpy\fB,\fR
+\fB XftFont *\fIfont\fB,\fR
+\fB FT_UInt *\fIglyphs\fB,\fR
+\fB int \fInglyphs\fB,\fR
+\fB XGlyphInfo *\fIextents\fB);\fR
+.fi
+Also used internally by the
+.BR XftTextExtents *
+functions,
+.B XftGlyphExtents
+computes the pixel extents on display
+.I dpy
+of no more than
+.I nglyphs
+in the array
+.I glyphs
+drawn with
+.IR font ,
+storing them in
+.IR extents .
+The
+.B FT_UInt
+data type is defined by the FreeType library, and the
+.B XGlyphInfo
+data type is defined by the X Rendering Extension library.
+.SS "Drawing Strings (and Other Things)"
+.nf
+\fBXftDraw *\fR
+\fBXftDrawCreate (Display *\fIdpy\fB,\fR
+\fB Drawable \fIdrawable\fB,\fR
+\fB Visual *\fIvisual\fB,\fR
+\fB Colormap \fIcolormap\fB);\fR
.fi
.B XftDrawCreate
-creates a structure that can be used to render text and rectangles
-to the screen.
+creates a structure that can be used to render text and rectangles using
+the specified
+.IR drawable ,
+.IR visual ,
+and
+.I colormap
+on
+.IR display .
+The
+.BR Drawable ,
+.BR Visual ,
+and
+.B Colormap
+data types are defined by the X11 library.
+.PP
+.nf
+\fBXftDraw *\fR
+\fBXftDrawCreateBitmap (Display *\fIdpy\fB,\fR
+\fB Pixmap \fIbitmap\fB);\fR
+.fi
+.B XftDrawCreateBitmap
+behaves as
+.BR XftDrawCreate ,
+except it uses an X pixmap of color depth 1 instead of an X drawable.
+The
+.B Pixmap
+data type is defined by the X11 library.
+.PP
+.nf
+\fBXftDraw *\fR
+\fBXftDrawCreateAlpha (Display *\fIdpy\fB,\fR
+\fB Pixmap \fIpixmap\fB,\fR
+\fB int \fIdepth\fB);\fR
+.fi
+.B XftDrawCreateAlpha
+behaves as
+.BR XftDrawCreate ,
+except it uses an X pixmap of color depth
+.I depth
+instead of an X drawable.
+The
+.B Pixmap
+data type is defined by the X11 library.
+.PP
+.nf
+\fBvoid\fR
+\fBXftDrawChange (XftDraw *\fIdraw\fB,\fR
+\fB Drawable \fIdrawable\fB);\fR
+.fi
+.B XftDrawChange
+changes the X drawable association of the existing Xft draw object
+.I draw
+from its current value to
+.IR drawable .
+.PP
+.nf
+\fBDisplay *\fR
+\fBXftDrawDisplay (XftDraw *\fIdraw\fB);\fR
+.fi
+.B XftDrawDisplay
+returns a pointer to the display associated with the Xft draw object
+.IR draw .
+.PP
+.nf
+\fBDrawable\fR
+\fBXftDrawDrawable (XftDraw *\fIdraw\fB);\fR
+.fi
+.B XftDrawDrawable
+returns the X drawable associated with the Xft draw object
+.IR draw .
+.PP
+.nf
+\fBColormap\fR
+\fBXftDrawColormap (XftDraw *\fIdraw\fB);\fR
+.fi
+.B XftDrawColormap
+returns the colormap associatied with the Xft draw object
+.IR draw .
+.PP
+.nf
+\fBVisual *\fR
+\fBXftDrawVisual (XftDraw *\fIdraw\fB);\fR
+.fi
+.B XftDrawVisual
+returns a pointer to the visual associated with the Xft draw object
+.IR draw .
+.PP
+.nf
+\fBPicture\fR
+\fBXftDrawPicture (XftDraw *\fIdraw\fB);\fR
+.fi
+.B XftDrawPicture
+returns the picture associated with the Xft draw object
+.IR draw .
+If the the X server does not support the X Rendering Extension, 0 is
+returned.
+.PP
+.nf
+\fBPicture\fR
+\fBXftDrawSrcPicture (XftDraw *\fIdraw\fB,\fR
+\fB XftColor *\fIcolor\fB);\fR
+.fi
+.\" Unfortunately, I'm not quite sure what this does. I think it is the gizmo
+.\" that is used to create an Xrender Picture object so that glyphs can be
+.\" drawn in the XftDraw object
+.\" .I draw
+.\" using the specified
+.\" .IR color .
+.\" -- BR, 2005-04-02
+This function is never called if the X server doesn't support the X
+Rendering Extension; instead,
+.B XftGlyphCore
+is used.
+.PP
+.nf
+\fBvoid\fR
+\fBXftDrawDestroy (XftDraw *\fIdraw\fB);\fR
+.fi
+.B XftDrawDestroy
+destroys
+.I draw
+(created by one of the
+.B XftCreate
+functions) and frees the memory that was allocated for it.
.PP
.nf
-void
-XftDrawString8 (XftDraw *d,
- XRenderColor *color,
- XftFont *font,
- int x,
- int y,
- unsigned char *string,
- int len);
+\fBvoid\fR
+\fBXftDrawString8 (XftDraw *\fId\fB,\fR
+\fB XRenderColor *\fIcolor\fB,\fR
+\fB XftFont *\fIfont\fB,\fR
+\fB int \fIx\fB,\fR
+\fB int \fIy\fB,\fR
+\fB unsigned char *\fIstring\fB,\fR
+\fB int \fIlen\fB);\fR
.fi
.B XftDrawString8
-draws "string" using "font" in "color" at "x, y".
+draws no more than
+.I len
+glyphs of
+.I string
+to Xft drawable
+.I d
+using
+.I font
+in
+.I color
+at position
+.IR x , " y" .
+The
+.B XRenderColor
+data type is defined by the X Rendering Extension library.
.PP
.nf
-void
-XftDrawRect (XftDraw *d,
- XRenderColor *color,
- int x,
- int y,
- unsigned int width,
- unsigned int height);
+\fBvoid\fR
+\fBXftDrawRect (XftDraw *\fId\fB,\fR
+\fB XRenderColor *\fIcolor\fB,\fR
+\fB int \fIx\fB,\fR
+\fB int \fIy\fB,\fR
+\fB unsigned int \fIwidth\fB,\fR
+\fB unsigned int \fIheight\fB);\fR
.fi
.B XftDrawRect
-fills a solid rectangle in the specified color.
-
+draws a solid rectangle of the specified
+.IR color ,
+.IR width ,
+and
+.I height
+at position
+.IR x , " y"
+to Xft drawable
+.IR d .
.SH COMPATIBILITY
-As of version 2,
+As of version 2,
.B Xft
has become relatively stable and is expected to retain source and binary
compatibility in future releases.
-
+.PP
+.B Xft
+does provide a compatibility interface to its previous major version,
+Xft
+.RI 1. x ,
+described below.
+.SS "Xft 1.x Compatibility Header File"
+.B #include <X11/Xft/XftCompat.h>
+.\" .SS "Xft 1.x Compatibility Constants"
+.SS "Xft 1.x Compatibility Data Types"
+.TP
+.B XftPattern
+holds a set of names with associated value lists; each name refers to a
+property of a font.
+.BR XftPattern s
+are used as inputs to the matching code as well as holding information
+about specific fonts.
+.TP
+.B XftFontSet
+contains a list of
+.BR XftPattern s.
+Internally,
+.B Xft
+uses this data structure to hold sets of fonts.
+Externally,
+.B Xft
+returns the results of listing fonts in this format.
+.TP
+.B XftObjectSet
+holds a set of names and is used to specify which fields from fonts are
+placed in the the list of returned patterns when listing fonts.
+.\" .SS "Xft 1.x Compatibility Functions"
.SH AUTHOR
Keith Packard
+.SH "SEE ALSO"
+.I Fontconfig Developers Reference
+.br
+.I FreeType API Reference
+.br
+.I Xlib \- C Language Interface
+.\" Set Vim modeline; textwidth is 70 to account for the extra margin
+.\" padding that man (on Debian GNU/Linux) does for output to
+.\" terminals (7 spaces on the left, 2 on the right), so that we don't
+.\" go past 80 columns total, particularly in .nf/.fi regions.
+.\" vim:set ai et sts=4 sw=4 tw=70:
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftcolor.c xorg-x11-6.8.x.99/xc/lib/Xft/xftcolor.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftcolor.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftcolor.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftcolor.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/XftCompat.h xorg-x11-6.8.x.99/xc/lib/Xft/XftCompat.h
--- xorg-x11-6.8.2/xc/lib/Xft/XftCompat.h 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/XftCompat.h 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: XftCompat.h,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2001 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2001 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
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xft-config.1.in xorg-x11-6.8.x.99/xc/lib/Xft/xft-config.1.in
--- xorg-x11-6.8.2/xc/lib/Xft/xft-config.1.in 1970-01-01 03:00:00 +0300
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xft-config.1.in 2005-06-25 02:43:20 +0400
@@ -0,0 +1,120 @@
+.\" Copyright 2005 Branden Robinson
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a copy
+.\" of this document (the "Document"), to deal in the Document without
+.\" restriction, including without limitation the rights to use, copy, modify,
+.\" merge, publish, distribute, sublicense, and/or sell copies of the Document,
+.\" and to permit persons to whom the Document is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included in
+.\" all copies or substantial portions of the Document.
+.\"
+.\" THE DOCUMENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+.\" THE AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE DOCUMENT OR THE USE OR OTHER
+.\" DEALINGS IN THE DOCUMENT.
+.TH xft-config 1 "Version @VERSION@" "Xft"
+.SH NAME
+xft\-config \- report Xft version, compiler, linker, and/or installation \
+directory information
+.SH SYNOPSIS
+.B xft\-config
+{
+.BR \-\-exec\-prefix [ =\fIlocal_prefix\fR ]
+|
+.BR \-\-prefix [ =\fIlocal_prefix\fR ]
+|
+.B \-\-cflags
+|
+.B \-\-libs
+} ...
+.PP
+.B xft\-config \-\-version
+.SH DESCRIPTION
+.B xft\-config
+reports information of interest to users and developers about the installed
+version of the X FreeType library,
+.BR Xft (3).
+Depending on how it is invoked,
+.B xft\-config
+reports the installed version of Xft, the compiler and linker flags
+that are required to successfully compile and link C (or C-compatible) code
+that uses the library, and/or the directories used by the GNU Autotools to
+install its files.
+Note that if the system's installed version of Xft came from an OS vendor
+or other third party, the actual location of its files may differ from
+those reported by
+.BR xft\-config .
+The system adminstrator can also relocate Xft's files.
+.PP
+If invoked without any arguments,
+.B xft\-config
+will print a usage message on standard error and exit.
+.SH OPTIONS
+.TP
+.B \-\-cflags
+Report the compiler flags that are required to compile code that uses Xft
+symbols.
+.TP
+.BR \-\-exec\-prefix [ =\fIlocal_prefix\fR ]
+If specified without the parameter
+.IR local_prefix ,
+report the file specification prefix that Xft uses for installation of
+executable files.
+If
+.I local_prefix
+is specified, it is used instead of the file specification prefix used for
+installation of executable files by Xft and the value of the option
+argument specified with
+.BR \-\-prefix ,
+if any, when compile and linker flags are reported (with
+.B \-\-cflags
+and
+.BR \-\-libs ,
+respectively).
+.TP
+.B \-\-libs
+Report the linker flags that are required to link code that uses Xft
+symbols.
+.TP
+.BR \-\-prefix [ =\fIlocal_prefix\fR ]
+If specified without the parameter
+.IR local_prefix ,
+report the file specification prefix that Xft uses for installation of
+files.
+If
+.I local_prefix
+is specified, it is used instead of the file specification prefix used for
+installation of files by Xft when compile and linker flags are reported
+(with
+.B \-\-cflags
+and
+.BR \-\-libs ,
+respectively); also see
+.BR \-\-exec\-prefix .
+.TP
+.B \-\-version
+Report the version of the Xft library installed on the system and exit.
+.SH OPERANDS
+.B xft\-config
+does not recognize any non-option arguments.
+At least one option must be specified.
+.SH "EXIT STATUS"
+.TP
+0
+Information was successfully reported.
+.TP
+1
+.B xft\-config
+was invoked with invalid arguments, or no arguments at all.
+.SH AUTHOR
+.B xft\-config
+was written by Keith Packard.
+This manual page was written by Branden Robinson.
+.SH "SEE ALSO"
+.BR Xft (3)
+.\" vim:set et tw=80
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftcore.c xorg-x11-6.8.x.99/xc/lib/Xft/xftcore.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftcore.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftcore.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftcore.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -21,9 +22,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
#include "xftint.h"
-#include <X11/Xmd.h>
void
XftRectCore (XftDraw *draw,
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftdbg.c xorg-x11-6.8.x.99/xc/lib/Xft/xftdbg.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftdbg.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftdbg.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftdbg.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -21,8 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
-#include <stdio.h>
#include "xftint.h"
int
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/Xft-def.cpp xorg-x11-6.8.x.99/xc/lib/Xft/Xft-def.cpp
--- xorg-x11-6.8.2/xc/lib/Xft/Xft-def.cpp 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/Xft-def.cpp 2005-06-25 13:48:46 +0400
@@ -178,7 +178,6 @@
XftRenderString16
#else
XftCharExists
-XftDrawCharSpec
#endif /* __UNIXOS2__ */
-/* $XFree86: xc/lib/Xft/Xft-def.cpp,v 1.4 2002/09/18 01:25:00 dawes Exp $ */
+/* $Id: Xft-def.cpp,v 1.3 2005/06/24 22:43:20 alanc Exp $ */
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftdpy.c xorg-x11-6.8.x.99/xc/lib/Xft/xftdpy.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftdpy.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftdpy.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftdpy.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -21,10 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <X11/Xlibint.h>
#include "xftint.h"
XftDisplayInfo *_XftDisplayInfo;
@@ -100,6 +97,7 @@
info->display = dpy;
info->defaults = 0;
+ info->solidFormat = 0;
info->hasRender = (XRenderQueryExtension (dpy, &event_base, &error_base) &&
(XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0));
info->use_free_glyphs = FcTrue;
@@ -109,22 +107,23 @@
XRenderQueryVersion (dpy, &major, &minor);
if (major < 0 || (major == 0 && minor <= 2))
info->use_free_glyphs = FcFalse;
+
+ pf.type = PictTypeDirect;
+ pf.depth = 32;
+ pf.direct.redMask = 0xff;
+ pf.direct.greenMask = 0xff;
+ pf.direct.blueMask = 0xff;
+ pf.direct.alphaMask = 0xff;
+ info->solidFormat = XRenderFindFormat (dpy,
+ (PictFormatType|
+ PictFormatDepth|
+ PictFormatRedMask|
+ PictFormatGreenMask|
+ PictFormatBlueMask|
+ PictFormatAlphaMask),
+ &pf,
+ 0);
}
- pf.type = PictTypeDirect;
- pf.depth = 32;
- pf.direct.redMask = 0xff;
- pf.direct.greenMask = 0xff;
- pf.direct.blueMask = 0xff;
- pf.direct.alphaMask = 0xff;
- info->solidFormat = XRenderFindFormat (dpy,
- (PictFormatType|
- PictFormatDepth|
- PictFormatRedMask|
- PictFormatGreenMask|
- PictFormatBlueMask|
- PictFormatAlphaMask),
- &pf,
- 0);
if (XftDebug () & XFT_DBG_RENDER)
{
Visual *visual = DefaultVisual (dpy, DefaultScreen (dpy));
@@ -374,6 +373,10 @@
goto bail1;
if (!_XftDefaultInitBool (dpy, pat, FC_ANTIALIAS))
goto bail1;
+#ifdef FC_EMBOLDEN
+ if (!_XftDefaultInitBool (dpy, pat, FC_EMBOLDEN))
+ goto bail1;
+#endif
if (!_XftDefaultInitBool (dpy, pat, FC_AUTOHINT))
goto bail1;
#ifdef FC_HINT_STYLE
@@ -470,6 +473,14 @@
XftDefaultGetBool (dpy, FC_ANTIALIAS, screen,
True));
}
+#ifdef FC_EMBOLDEN
+ if (FcPatternGet (pattern, FC_EMBOLDEN, 0, &v) == FcResultNoMatch)
+ {
+ FcPatternAddBool (pattern, FC_EMBOLDEN,
+ XftDefaultGetBool (dpy, FC_EMBOLDEN, screen,
+ False));
+ }
+#endif
if (FcPatternGet (pattern, FC_HINTING, 0, &v) == FcResultNoMatch)
{
FcPatternAddBool (pattern, FC_HINTING,
@@ -494,15 +505,18 @@
{
int subpixel = FC_RGBA_UNKNOWN;
#if RENDER_MAJOR > 0 || RENDER_MINOR >= 6
- int render_order = XRenderQuerySubpixelOrder (dpy, screen);
- switch (render_order) {
- default:
- case SubPixelUnknown: subpixel = FC_RGBA_UNKNOWN; break;
- case SubPixelHorizontalRGB: subpixel = FC_RGBA_RGB; break;
- case SubPixelHorizontalBGR: subpixel = FC_RGBA_BGR; break;
- case SubPixelVerticalRGB: subpixel = FC_RGBA_VRGB; break;
- case SubPixelVerticalBGR: subpixel = FC_RGBA_VBGR; break;
- case SubPixelNone: subpixel = FC_RGBA_NONE; break;
+ if (XftDefaultHasRender (dpy))
+ {
+ int render_order = XRenderQuerySubpixelOrder (dpy, screen);
+ switch (render_order) {
+ default:
+ case SubPixelUnknown: subpixel = FC_RGBA_UNKNOWN; break;
+ case SubPixelHorizontalRGB: subpixel = FC_RGBA_RGB; break;
+ case SubPixelHorizontalBGR: subpixel = FC_RGBA_BGR; break;
+ case SubPixelVerticalRGB: subpixel = FC_RGBA_VRGB; break;
+ case SubPixelVerticalBGR: subpixel = FC_RGBA_VBGR; break;
+ case SubPixelNone: subpixel = FC_RGBA_NONE; break;
+ }
}
#endif
FcPatternAddInteger (pattern, FC_RGBA,
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftdraw.c xorg-x11-6.8.x.99/xc/lib/Xft/xftdraw.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftdraw.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftdraw.c 2005-06-25 13:48:47 +0400
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftdraw.c,v 1.25 2002/10/11 17:53:02 keithp Exp $
+ * $Id: xftdraw.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -22,12 +22,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include "xftint.h"
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
/*
* Ok, this is a pain. To share source pictures across multiple destinations,
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftextent.c xorg-x11-6.8.x.99/xc/lib/Xft/xftextent.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftextent.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftextent.c 2005-06-25 13:48:47 +0400
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftextent.c,v 1.9 2002/10/11 17:53:02 keithp Exp $
+ * $Id: xftextent.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -22,8 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
-#include <string.h>
#include "xftint.h"
void
@@ -66,14 +64,12 @@
(xftg = font->glyphs[glyph]))
break;
}
- if (n == 0 && !xftg)
+ if (n == 0)
{
- extents->width = 0;
- extents->height = 0;
- extents->x = 0;
- extents->y = 0;
- extents->yOff = 0;
- extents->xOff = 0;
+ if (xftg)
+ *extents = xftg->metrics;
+ else
+ memset (extents, '\0', sizeof (*extents));
}
else
{
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftfont.c xorg-x11-6.8.x.99/xc/lib/Xft/xftfont.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftfont.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftfont.c 2005-06-25 13:48:47 +0400
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftfont.c,v 1.9 2002/02/15 07:36:11 keithp Exp $
+ * $Id: xftfont.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -22,8 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdio.h>
-#include <stdlib.h>
#include "xftint.h"
FcPattern *
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftfreetype.c xorg-x11-6.8.x.99/xc/lib/Xft/xftfreetype.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftfreetype.c 2004-08-12 03:37:34 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftfreetype.c 2005-06-25 13:48:47 +0400
@@ -1,7 +1,7 @@
/*
- * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.29tsi Exp $
+ * $Id: xftfreetype.c,v 1.4 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -22,11 +22,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
#include "xftint.h"
-#include <X11/Xlibint.h>
FT_Library _XftFTlibrary;
@@ -289,8 +285,8 @@
if (f->face)
FT_Done_Face (f->face);
}
- XftMemFree (XFT_MEM_FILE,
- sizeof (XftFtFile) + f->file ? strlen (f->file) + 1 : 0);
+ XftMemFree (XFT_MEM_FILE,
+ sizeof (XftFtFile) + (f->file ? strlen (f->file) + 1 : 0));
free (f);
}
@@ -528,6 +524,20 @@
goto bail1;
}
+#ifdef FC_EMBOLDEN
+ switch (FcPatternGetBool (pattern, FC_EMBOLDEN, 0, &fi->embolden)) {
+ case FcResultNoMatch:
+ fi->embolden = FcFalse;
+ break;
+ case FcResultMatch:
+ break;
+ default:
+ goto bail1;
+ }
+#else
+ fi->embolden = FcFalse;
+#endif
+
#ifdef FC_HINT_STYLE
switch (FcPatternGetInteger (pattern, FC_HINT_STYLE, 0, &hint_style)) {
case FcResultNoMatch:
@@ -747,7 +757,7 @@
FT_Face face;
XftFont **bucket;
XftFontInt *font;
- XRenderPictFormat pf, *format;
+ XRenderPictFormat *format;
FcCharSet *charset;
FcChar32 num_unicode;
FcChar32 hash_value;
@@ -808,7 +818,7 @@
antialias = fi->antialias;
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE))
antialias = FcFalse;
-
+
/*
* Find the appropriate picture format
*/
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftglyphs.c xorg-x11-6.8.x.99/xc/lib/Xft/xftglyphs.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftglyphs.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftglyphs.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftglyphs.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -21,12 +22,8 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include "xftint.h"
#include <freetype/ftoutln.h>
-#include <fontconfig/fcfreetype.h>
static const int filters[3][3] = {
/* red */
@@ -172,6 +169,13 @@
glyphslot = face->glyph;
+#if HAVE_FT_GLYPHSLOT_EMBOLDEN
+ /*
+ * Embolden if required
+ */
+ if (font->info.embolden) FT_GlyphSlot_Embolden(glyphslot);
+#endif
+
/*
* Compute glyph metrics from FreeType information
*/
@@ -219,10 +223,10 @@
height = TRUNC( top - bottom );
/*
- * Try to keep monospace fonts ink-inside
+ * Clip charcell glyphs to the bounding box
* XXX transformed?
*/
- if (font->info.spacing != FC_PROPORTIONAL && !font->info.transform)
+ if (font->info.spacing >= FC_CHARCELL && !font->info.transform)
{
if (font->info.load_flags & FT_LOAD_VERTICAL_LAYOUT)
{
@@ -266,7 +270,7 @@
xftg->metrics.x = -TRUNC(left);
xftg->metrics.y = TRUNC(top);
- if (font->info.spacing != FC_PROPORTIONAL)
+ if (font->info.spacing >= FC_MONO)
{
if (font->info.transform)
{
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/Xft.h xorg-x11-6.8.x.99/xc/lib/Xft/Xft.h
--- xorg-x11-6.8.2/xc/lib/Xft/Xft.h 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/Xft.h 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: Xft.h,v 1.4 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -32,7 +33,7 @@
#define XFT_MAJOR 2
#define XFT_MINOR 1
-#define XFT_REVISION 6
+#define XFT_REVISION 7
#define XFT_VERSION ((XFT_MAJOR * 10000) + (XFT_MINOR * 100) + (XFT_REVISION))
#define XftVersion XFT_VERSION
@@ -44,6 +45,9 @@
#include <X11/Xfuncproto.h>
/* #include <X11/Xosdefs.h>*/
+#ifndef _X_SENTINEL
+# define _X_SENTINEL(x)
+#endif
#ifndef _XFT_NO_COMPAT_
#include <X11/Xft/XftCompat.h>
@@ -346,7 +350,7 @@
FcResult *result);
XftFont *
-XftFontOpen (Display *dpy, int screen, ...);
+XftFontOpen (Display *dpy, int screen, ...) _X_SENTINEL(0);
XftFont *
XftFontOpenName (Display *dpy, int screen, _Xconst char *name);
@@ -441,7 +445,7 @@
FcFontSet *
XftListFonts (Display *dpy,
int screen,
- ...);
+ ...) _X_SENTINEL(0);
/* xftmatch.c */
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftinit.c xorg-x11-6.8.x.99/xc/lib/Xft/xftinit.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftinit.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftinit.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftinit.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -21,10 +22,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
-#include <stdio.h>
#include "xftint.h"
-#include <X11/Xlibint.h>
Bool _XftConfigInitialized;
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftint.h xorg-x11-6.8.x.99/xc/lib/Xft/xftint.h
--- xorg-x11-6.8.2/xc/lib/Xft/xftint.h 2004-08-13 23:03:15 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftint.h 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftint.h,v 1.5 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright ц┌б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -26,7 +27,7 @@
* and constitute no kind of standard. If you need any of these functions,
* please drop me a note. Either the library needs new functionality,
* or there's a way to do what you need using the existing published
- * interfaces. keithp@xfree86.org
+ * interfaces. keithp@freedesktop.org
*/
#ifndef _XFTINT_H_
@@ -34,10 +35,28 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
+#else /* X monolithic tree */
+#define HAVE_STDLIB_H 1 /* assumed since all ANSI C platforms require it */
+#include <X11/Xosdefs.h> /* get string.h or strings.h as appropriate */
#endif
+#include <stdio.h>
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#if HAVE_STRING_H
+#include <string.h>
+#else
+#if HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#include <ctype.h>
+
#include <X11/Xlib.h>
+#include <X11/Xutil.h>
#include <X11/Xmd.h>
+#include <X11/Xlibint.h>
#define _XFT_NO_COMPAT_
#include "Xft.h"
#include <fontconfig/fcprivate.h>
@@ -118,6 +137,7 @@
*/
FT_F26Dot6 xsize, ysize; /* pixel size */
FcBool antialias; /* doing antialiasing */
+ FcBool embolden; /* force emboldening */
int rgba; /* subpixel order */
FT_Matrix matrix; /* glyph transformation matrix */
FcBool transform; /* non-identify matrix? */
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftlist.c xorg-x11-6.8.x.99/xc/lib/Xft/xftlist.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftlist.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftlist.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftlist.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -21,7 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
#include "xftint.h"
FcFontSet *
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/Xft.man xorg-x11-6.8.x.99/xc/lib/Xft/Xft.man
--- xorg-x11-6.8.2/xc/lib/Xft/Xft.man 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/Xft.man 1970-01-01 03:00:00 +0300
@@ -1,141 +0,0 @@
-.\"
-.\" $Id$
-.\"
-.\" Copyright б╘ 2000 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.
-.\"
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-.TH XFT __libmansuffix__ __vendorversion__
-
-.SH NAME
- Xft \- X FreeType interface library
-
-.SH DESCRIPTION
-.B Xft
-is a simple library designed to interface the FreeType rasterizer with the X
-Rendering Extension. This manual page barely scratches the surface of this
-library.
-
-.SH DATATYPES
-
-.B XftPattern
-holds a set of names with associated value lists; each name refers to a
-property of a font. XftPatterns are used as inputs to the matching code as
-well as holding information about specific fonts.
-
-.B XftFont
-contains general font metrics and a pointer to either the core XFontStruct
-data or a structure holding FreeType and X Render Extension data.
-
-.B XftFontStruct
-contains information about FreeType fonts used with the X Render Extension.
-
-.B XftFontSet
-contains a list of XftPatterns. Internally Xft uses this data structure to
-hold sets of fonts. Externally, Xft returns the results of listing fonts in
-this format.
-
-.B XftObjectSet
-holds a set of names and is used to specify which fields from fonts are
-placed in the the list of returned patterns when listing fonts.
-
-.B XftDraw
-is an opaque object which holds information used to render to an X drawable
-using either core protocol or the X Rendering extension.
-
-.SH FUNCTIONS
-.nf
-XftFont *
-XftFontOpen (Display *dpy, int screen, ...);
-.fi
-.B XftFontOpen
-takes a list of pattern elements of the form (field, type, value) terminated
-with a NULL, matches that pattern against the available fonts and opens the
-matching font.
-.PP
-Example:
-.br
- font = XftFontOpen (dpy, scr,
- XFT_FAMILY, XftTypeString, "charter",
- XFT_SIZE, XftTypeDouble, 12.0,
- NULL);
-.PP
-This opens the charter font at 12 points. The point size is automatically
-converted to the correct pixel size based on the resolution of the monitor.
-.PP
-.nf
-void
-XftTextExtents8 (Display *dpy,
- XftFont *font,
- unsigned char *string,
- int len,
- XGlyphInfo *extents);
-.fi
-.B XftTextExtents8
-computes the pixel extents of "string" when drawn with "font".
-.PP
-.nf
-XftDraw *
-XftDrawCreate (Display *dpy,
- Drawable drawable,
- Visual *visual,
- Colormap colormap);
-.fi
-.B XftDrawCreate
-creates a structure that can be used to render text and rectangles
-to the screen.
-.PP
-.nf
-void
-XftDrawString8 (XftDraw *d,
- XRenderColor *color,
- XftFont *font,
- int x,
- int y,
- unsigned char *string,
- int len);
-.fi
-.B XftDrawString8
-draws "string" using "font" in "color" at "x, y".
-.PP
-.nf
-void
-XftDrawRect (XftDraw *d,
- XRenderColor *color,
- int x,
- int y,
- unsigned int width,
- unsigned int height);
-.fi
-.B XftDrawRect
-fills a solid rectangle in the specified color.
-
-.SH COMPATIBILITY
-As of version 2,
-.B Xft
-has become relatively stable and is expected to retain source and binary
-compatibility in future releases.
-
-.SH AUTHOR
-Keith Packard
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftname.c xorg-x11-6.8.x.99/xc/lib/Xft/xftname.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftname.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftname.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftname.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -22,7 +23,6 @@
*/
#include "xftint.h"
-#include <stdlib.h>
static const FcObjectType _XftObjectTypes[] = {
{ XFT_CORE, FcTypeBool, },
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftrender.c xorg-x11-6.8.x.99/xc/lib/Xft/xftrender.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftrender.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftrender.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftrender.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright ц┌б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -21,7 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
#include "xftint.h"
#define NUM_LOCAL 1024
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftstr.c xorg-x11-6.8.x.99/xc/lib/Xft/xftstr.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftstr.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftstr.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftstr.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -21,9 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
#include "xftint.h"
int
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftswap.c xorg-x11-6.8.x.99/xc/lib/Xft/xftswap.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftswap.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftswap.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftswap.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2002 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2002 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
@@ -21,7 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <X11/Xlib.h>
#include "xftint.h"
int
diff -Naur xorg-x11-6.8.2/xc/lib/Xft/xftxlfd.c xorg-x11-6.8.x.99/xc/lib/Xft/xftxlfd.c
--- xorg-x11-6.8.2/xc/lib/Xft/xftxlfd.c 2004-04-23 22:43:42 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/xftxlfd.c 2005-06-25 13:48:47 +0400
@@ -1,6 +1,7 @@
/*
+ * $Id: xftxlfd.c,v 1.3 2005/06/24 22:43:20 alanc Exp $
*
- * Copyright б╘ 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright б╘ 2000 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
@@ -21,9 +22,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
#include "xftint.h"
static XftSymbolic XftXlfdWeights[] = {
--- xorg-x11-6.8.2/xc/lib/Xft/Imakefile 2005-07-21 12:26:39 +0400
+++ xorg-x11-6.8.x.99/xc/lib/Xft/Imakefile 2005-07-21 12:30:33 +0400
@@ -45,9 +45,10 @@
WARNINGS=-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
#endif
INCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) -I$(XBUILDINCDIR) $(WARNINGS)
-DEFINES=$(FREETYPE2DEFINES) $(RENDERDEFINES) -DXFREE86_FT2 -DHAVE_CONFIG_H
+DEFINES=$(FREETYPE2DEFINES) $(RENDERDEFINES) -DXFREE86_FT2 -DHAVE_CONFIG_H
XFT_REVISION=7
+XFT_VERSION=2.1.$(XFT_REVISION)
FREETYPE_LIBS=$(FREETYPE2LIB)
FREETYPE_CFLAGS=$(FREETYPE2INCLUDES)
@@ -85,7 +86,7 @@
libdir="$(USRLIBDIR)" \
hardcode_libdir_flag_spec="$(RPATH_CFLAG)" \
includedir="$(INCROOT)" \
- VERSION="$(SOXFTREV).$(XFT_REVISION)" \
+ VERSION="$(XFT_VERSION)" \
FREETYPE_LIBS="$(FREETYPE_LIBS)" \
FREETYPE_CFLAGS="$(FREETYPE_CFLAGS)" \
XRENDER_LIBS="$(XRENDER_LIBS)" \