aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/font/include
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:43:39 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:43:39 +0200
commitf4092abdf94af6a99aff944d6264bc1284e8bdd4 (patch)
tree2ac1c9cc16ceb93edb2c4382c088dac5aeafdf0f /nx-X11/lib/font/include
parenta840692edc9c6d19cd7c057f68e39c7d95eb767d (diff)
downloadnx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.gz
nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.bz2
nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.zip
Imported nx-X11-3.1.0-1.tar.gznx-X11/3.1.0-1
Summary: Imported nx-X11-3.1.0-1.tar.gz Keywords: Imported nx-X11-3.1.0-1.tar.gz into Git repository
Diffstat (limited to 'nx-X11/lib/font/include')
-rw-r--r--nx-X11/lib/font/include/Imakefile11
-rw-r--r--nx-X11/lib/font/include/bitmap.h116
-rw-r--r--nx-X11/lib/font/include/bufio.h92
-rw-r--r--nx-X11/lib/font/include/fntfil.h178
-rw-r--r--nx-X11/lib/font/include/fntfilio.h56
-rw-r--r--nx-X11/lib/font/include/fntfilst.h198
-rw-r--r--nx-X11/lib/font/include/fontenc.h124
-rw-r--r--nx-X11/lib/font/include/fontencc.h36
-rw-r--r--nx-X11/lib/font/include/fontmisc.h133
-rw-r--r--nx-X11/lib/font/include/fontmod.h16
-rw-r--r--nx-X11/lib/font/include/fontshow.h37
-rw-r--r--nx-X11/lib/font/include/fontutil.h26
-rw-r--r--nx-X11/lib/font/include/fontxlfd.h100
13 files changed, 1123 insertions, 0 deletions
diff --git a/nx-X11/lib/font/include/Imakefile b/nx-X11/lib/font/include/Imakefile
new file mode 100644
index 000000000..91c84e6ec
--- /dev/null
+++ b/nx-X11/lib/font/include/Imakefile
@@ -0,0 +1,11 @@
+XCOMM $Xorg$
+ HEADERS = bitmap.h bufio.h fntfil.h fntfilio.h fntfilst.h fontenc.h \
+ fontencc.h fontmisc.h fontmod.h fontshow.h fontutil.h \
+ fontxlfd.h
+all::
+
+BuildIncludes($(HEADERS),X11/fonts,../..)
+
+#if BuildLibraries
+InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/fonts,$(INSTINCFLAGS))
+#endif
diff --git a/nx-X11/lib/font/include/bitmap.h b/nx-X11/lib/font/include/bitmap.h
new file mode 100644
index 000000000..e60fda8eb
--- /dev/null
+++ b/nx-X11/lib/font/include/bitmap.h
@@ -0,0 +1,116 @@
+/* $Xorg: bitmap.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */
+
+/*
+
+Copyright 1990, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE 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 OPEN GROUP 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 SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+/* $XFree86: xc/lib/font/include/bitmap.h,v 1.9 2001/01/17 19:43:31 dawes Exp $ */
+
+/*
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#ifndef _BITMAP_H_
+#define _BITMAP_H_
+
+#include <X11/fonts/fntfilio.h>
+#ifndef FONTMODULE
+#include <stdio.h> /* just for NULL */
+#else
+#include "xf86_ansic.h"
+#endif
+
+/*
+ * Internal format used to store bitmap fonts
+ */
+
+/* number of encoding entries in one segment */
+#define BITMAP_FONT_SEGMENT_SIZE 128
+
+typedef struct _BitmapExtra {
+ Atom *glyphNames;
+ int *sWidths;
+ CARD32 bitmapsSizes[GLYPHPADOPTIONS];
+ FontInfoRec info;
+} BitmapExtraRec, *BitmapExtraPtr;
+
+typedef struct _BitmapFont {
+ unsigned version_num;
+ int num_chars;
+ int num_tables;
+ CharInfoPtr metrics; /* font metrics, including glyph pointers */
+ xCharInfo *ink_metrics; /* ink metrics */
+ char *bitmaps; /* base of bitmaps, useful only to free */
+ CharInfoPtr **encoding; /* array of arrays of char info pointers */
+ CharInfoPtr pDefault; /* default character */
+ BitmapExtraPtr bitmapExtra; /* stuff not used by X server */
+} BitmapFontRec, *BitmapFontPtr;
+
+#define ACCESSENCODING(enc,i) \
+(enc[(i)/BITMAP_FONT_SEGMENT_SIZE]?\
+(enc[(i)/BITMAP_FONT_SEGMENT_SIZE][(i)%BITMAP_FONT_SEGMENT_SIZE]):\
+0)
+#define ACCESSENCODINGL(enc,i) \
+(enc[(i)/BITMAP_FONT_SEGMENT_SIZE][(i)%BITMAP_FONT_SEGMENT_SIZE])
+
+#define SEGMENT_MAJOR(n) ((n)/BITMAP_FONT_SEGMENT_SIZE)
+#define SEGMENT_MINOR(n) ((n)%BITMAP_FONT_SEGMENT_SIZE)
+#define NUM_SEGMENTS(n) \
+ (((n)+BITMAP_FONT_SEGMENT_SIZE-1)/BITMAP_FONT_SEGMENT_SIZE)
+
+extern int bitmapGetGlyphs ( FontPtr pFont, unsigned long count,
+ unsigned char *chars, FontEncoding charEncoding,
+ unsigned long *glyphCount, CharInfoPtr *glyphs );
+extern int bitmapGetMetrics ( FontPtr pFont, unsigned long count,
+ unsigned char *chars, FontEncoding charEncoding,
+ unsigned long *glyphCount, xCharInfo **glyphs );
+
+extern void bitmapComputeFontBounds ( FontPtr pFont );
+extern void bitmapComputeFontInkBounds ( FontPtr pFont );
+extern Bool bitmapAddInkMetrics ( FontPtr pFont );
+extern int bitmapComputeWeight ( FontPtr pFont );
+
+extern int BitmapOpenBitmap ( FontPathElementPtr fpe, FontPtr *ppFont,
+ int flags, FontEntryPtr entry, char *fileName,
+ fsBitmapFormat format, fsBitmapFormatMask fmask,
+ FontPtr non_cachable_font );
+extern int BitmapGetInfoBitmap ( FontPathElementPtr fpe,
+ FontInfoPtr pFontInfo, FontEntryPtr entry,
+ char *fileName );
+extern void BitmapRegisterFontFileFunctions ( void );
+extern int BitmapGetRenderIndex ( FontRendererPtr renderer );
+
+extern int BitmapOpenScalable ( FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry, char *fileName,
+ FontScalablePtr vals, fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
+ FontPtr non_cachable_font );
+extern int BitmapGetInfoScalable ( FontPathElementPtr fpe,
+ FontInfoPtr pFontInfo, FontEntryPtr entry,
+ FontNamePtr fontName, char *fileName,
+ FontScalablePtr vals );
+
+#endif /* _BITMAP_H_ */
diff --git a/nx-X11/lib/font/include/bufio.h b/nx-X11/lib/font/include/bufio.h
new file mode 100644
index 000000000..da90064a2
--- /dev/null
+++ b/nx-X11/lib/font/include/bufio.h
@@ -0,0 +1,92 @@
+/* $Xorg: bufio.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */
+
+/*
+
+Copyright 1993, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE 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 OPEN GROUP 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 SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+/* $XFree86: xc/lib/font/include/bufio.h,v 1.6 2001/07/31 16:44:55 alanh Exp $ */
+
+#ifndef ___BUFIO_H___
+#define ___BUFIO_H___ 1
+
+#include <X11/Xfuncproto.h>
+
+#ifdef TEST
+
+#define xalloc(s) malloc(s)
+#define xfree(s) free(s)
+
+#endif
+
+#define BUFFILESIZE 8192
+#define BUFFILEEOF -1
+
+typedef unsigned char BufChar;
+typedef struct _buffile *BufFilePtr;
+
+typedef struct _buffile {
+ BufChar *bufp;
+ int left;
+ int eof;
+ BufChar buffer[BUFFILESIZE];
+ int (*input)( BufFilePtr /* f */);
+ int (*output)( int /* c */, BufFilePtr /* f */);
+ int (*skip)( BufFilePtr /* f */, int /* count */);
+ int (*close)( BufFilePtr /* f */, int /* doClose */);
+ char *private;
+} BufFileRec;
+
+extern BufFilePtr BufFileCreate (
+ char*,
+ int (*)(BufFilePtr),
+ int (*)(int, BufFilePtr),
+ int (*)(BufFilePtr, int),
+ int (*)(BufFilePtr, int));
+extern BufFilePtr BufFileOpenRead ( int );
+extern BufFilePtr BufFileOpenWrite ( int );
+extern BufFilePtr BufFilePushCompressed ( BufFilePtr );
+#ifdef X_GZIP_FONT_COMPRESSION
+extern BufFilePtr BufFilePushZIP ( BufFilePtr );
+#endif
+extern int BufFileClose ( BufFilePtr, int );
+extern int BufFileFlush ( BufFilePtr, int );
+extern int BufFileRead ( BufFilePtr, char*, int );
+extern int BufFileWrite ( BufFilePtr, char*, int );
+extern void BufFileFree ( BufFilePtr );
+
+#define BufFileGet(f) ((f)->left-- ? *(f)->bufp++ : ((f)->eof = (*(f)->input) (f)))
+#define BufFilePut(c,f) (--(f)->left ? *(f)->bufp++ = ((unsigned char)(c)) : (*(f)->output) ((unsigned char)(c),f))
+#define BufFileSkip(f,c) ((f)->eof = (*(f)->skip) (f, c))
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#endif /* ___BUFIO_H___ */
+
diff --git a/nx-X11/lib/font/include/fntfil.h b/nx-X11/lib/font/include/fntfil.h
new file mode 100644
index 000000000..81d2cbc3d
--- /dev/null
+++ b/nx-X11/lib/font/include/fntfil.h
@@ -0,0 +1,178 @@
+/* $Xorg: fntfil.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */
+
+/*
+
+Copyright 1991, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE 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
+OPEN GROUP 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/lib/font/include/fntfil.h,v 1.9 2001/12/14 19:56:54 dawes Exp $ */
+
+/*
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#ifndef _FONTFILE_H_
+#define _FONTFILE_H_
+
+#include <X11/fonts/fontxlfd.h>
+
+typedef struct _FontEntry *FontEntryPtr;
+typedef struct _FontTable *FontTablePtr;
+typedef struct _FontName *FontNamePtr;
+typedef struct _FontScaled *FontScaledPtr;
+typedef struct _FontScalableExtra *FontScalableExtraPtr;
+typedef struct _FontScalableEntry *FontScalableEntryPtr;
+typedef struct _FontScaleAliasEntry *FontScaleAliasEntryPtr;
+typedef struct _FontBitmapEntry *FontBitmapEntryPtr;
+typedef struct _FontAliasEntry *FontAliasEntryPtr;
+typedef struct _FontBCEntry *FontBCEntryPtr;
+typedef struct _FontDirectory *FontDirectoryPtr;
+typedef struct _FontRenderer *FontRendererPtr;
+
+#define NullFontEntry ((FontEntryPtr) 0)
+#define NullFontTable ((FontTablePtr) 0)
+#define NullFontName ((FontNamePtr) 0)
+#define NullFontScaled ((FontScaled) 0)
+#define NullFontScalableExtra ((FontScalableExtra) 0)
+#define NullFontscalableEntry ((FontScalableEntry) 0)
+#define NullFontScaleAliasEntry ((FontScaleAliasEntry) 0)
+#define NullFontBitmapEntry ((FontBitmapEntry) 0)
+#define NullFontAliasEntry ((FontAliasEntry) 0)
+#define NullFontBCEntry ((FontBCEntry) 0)
+#define NullFontDirectory ((FontDirectoryPtr) 0)
+#define NullFontRenderer ((FontRendererPtr) 0)
+
+#define FONT_ENTRY_SCALABLE 0
+#define FONT_ENTRY_SCALE_ALIAS 1
+#define FONT_ENTRY_BITMAP 2
+#define FONT_ENTRY_ALIAS 3
+#define FONT_ENTRY_BC 4
+
+#define MAXFONTNAMELEN 1024
+#define MAXFONTFILENAMELEN 1024
+
+#define FontDirFile "fonts.dir"
+#define FontAliasFile "fonts.alias"
+#define FontScalableFile "fonts.scale"
+
+extern int FontFileNameCheck ( char *name );
+extern int FontFileInitFPE ( FontPathElementPtr fpe );
+extern int FontFileResetFPE ( FontPathElementPtr fpe );
+extern int FontFileFreeFPE ( FontPathElementPtr fpe );
+extern int FontFileOpenFont ( pointer client, FontPathElementPtr fpe,
+ Mask flags, char *name, int namelen,
+ fsBitmapFormat format, fsBitmapFormatMask fmask,
+ XID id, FontPtr *pFont, char **aliasName,
+ FontPtr non_cachable_font );
+extern void FontFileCloseFont ( FontPathElementPtr fpe, FontPtr pFont );
+extern int FontFileOpenBitmap ( FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry,
+ fsBitmapFormat format,
+ fsBitmapFormatMask fmask );
+extern int FontFileListFonts ( pointer client, FontPathElementPtr fpe,
+ char *pat, int len, int max,
+ FontNamesPtr names );
+extern int FontFileStartListFontsWithInfo ( pointer client,
+ FontPathElementPtr fpe,
+ char *pat, int len, int max,
+ pointer *privatep );
+extern int FontFileListNextFontWithInfo ( pointer client,
+ FontPathElementPtr fpe,
+ char **namep, int *namelenp,
+ FontInfoPtr *pFontInfo,
+ int *numFonts, pointer private );
+extern int FontFileStartListFontsAndAliases ( pointer client,
+ FontPathElementPtr fpe,
+ char *pat, int len, int max,
+ pointer *privatep );
+extern int FontFileListNextFontOrAlias ( pointer client,
+ FontPathElementPtr fpe,
+ char **namep, int *namelenp,
+ char **resolvedp, int *resolvedlenp,
+ pointer private );
+extern void FontFileRegisterLocalFpeFunctions ( void );
+
+
+extern FontEntryPtr FontFileAddEntry ( FontTablePtr table,
+ FontEntryPtr prototype );
+extern Bool FontFileAddFontAlias ( FontDirectoryPtr dir, char *aliasName,
+ char *fontName );
+extern Bool FontFileAddFontFile ( FontDirectoryPtr dir, char *fontName,
+ char *fileName );
+extern int FontFileCountDashes ( char *name, int namelen );
+extern FontEntryPtr FontFileFindNameInDir ( FontTablePtr table,
+ FontNamePtr pat );
+extern FontEntryPtr FontFileFindNameInScalableDir ( FontTablePtr table,
+ FontNamePtr pat,
+ FontScalablePtr vals );
+extern int FontFileFindNamesInDir ( FontTablePtr table, FontNamePtr pat,
+ int max, FontNamesPtr names );
+extern int FontFileFindNamesInScalableDir ( FontTablePtr table,
+ FontNamePtr pat, int max,
+ FontNamesPtr names,
+ FontScalablePtr vals,
+ int alias_behavior, int *newmax );
+
+extern void FontFileFreeDir ( FontDirectoryPtr dir );
+extern void FontFileFreeEntry ( FontEntryPtr entry );
+extern void FontFileFreeTable ( FontTablePtr table );
+extern Bool FontFileInitTable ( FontTablePtr table, int size );
+extern FontDirectoryPtr FontFileMakeDir ( char *dirName, int size );
+extern Bool FontFileMatchName ( char *name, int length, FontNamePtr pat );
+extern char * FontFileSaveString ( char *s );
+extern void FontFileSortDir ( FontDirectoryPtr dir );
+extern void FontFileSortTable ( FontTablePtr table );
+
+extern void FontDefaultFormat ( int *bit, int *byte, int *glyph, int *scan );
+
+extern Bool FontFileRegisterRenderer ( FontRendererPtr renderer );
+extern Bool FontFilePriorityRegisterRenderer ( FontRendererPtr renderer,
+ int priority );
+extern FontRendererPtr FontFileMatchRenderer ( char *fileName );
+
+extern Bool FontFileAddScaledInstance ( FontEntryPtr entry,
+ FontScalablePtr vals, FontPtr pFont,
+ char *bitmapName );
+extern void FontFileSwitchStringsToBitmapPointers ( FontDirectoryPtr dir );
+extern void FontFileRemoveScaledInstance ( FontEntryPtr entry, FontPtr pFont );
+extern Bool FontFileCompleteXLFD ( FontScalablePtr vals, FontScalablePtr def );
+extern FontScaledPtr FontFileFindScaledInstance ( FontEntryPtr entry,
+ FontScalablePtr vals,
+ int noSpecificSize );
+
+extern Bool FontFileRegisterBitmapSource ( FontPathElementPtr fpe );
+extern void FontFileUnregisterBitmapSource ( FontPathElementPtr fpe );
+extern void FontFileEmptyBitmapSource ( void );
+extern int FontFileMatchBitmapSource ( FontPathElementPtr fpe,
+ FontPtr *pFont, int flags,
+ FontEntryPtr entry,
+ FontNamePtr zeroPat,
+ FontScalablePtr vals,
+ fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
+ Bool noSpecificSize );
+
+extern int FontFileReadDirectory ( char *directory, FontDirectoryPtr *pdir );
+extern Bool FontFileDirectoryChanged ( FontDirectoryPtr dir );
+
+#endif /* _FONTFILE_H_ */
diff --git a/nx-X11/lib/font/include/fntfilio.h b/nx-X11/lib/font/include/fntfilio.h
new file mode 100644
index 000000000..f8e24f390
--- /dev/null
+++ b/nx-X11/lib/font/include/fntfilio.h
@@ -0,0 +1,56 @@
+/* $Xorg: fntfilio.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */
+
+/*
+
+Copyright 1991, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE 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
+OPEN GROUP 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/lib/font/include/fntfilio.h,v 1.6 2001/10/31 22:50:26 tsi Exp $ */
+
+/*
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#ifndef _FNTFILIO_H_
+#define _FNTFILIO_H_
+
+#include <X11/fonts/bufio.h>
+
+typedef BufFilePtr FontFilePtr;
+
+#define FontFileGetc(f) BufFileGet(f)
+#define FontFilePutc(c,f) BufFilePut(c,f)
+#define FontFileRead(f,b,n) BufFileRead(f,b,n)
+#define FontFileWrite(f,b,n) BufFileWrite(f,b,n)
+#define FontFileSkip(f,n) (BufFileSkip (f, n) != BUFFILEEOF)
+#define FontFileSeek(f,n) (BufFileSeek (f,n,0) != BUFFILEEOF)
+
+#define FontFileEOF BUFFILEEOF
+
+extern FontFilePtr FontFileOpen ( const char *name );
+extern int FontFileClose ( FontFilePtr f );
+extern FontFilePtr FontFileOpenWrite ( const char *name );
+extern FontFilePtr FontFileOpenWriteFd ( int fd );
+extern FontFilePtr FontFileOpenFd ( int fd );
+
+#endif /* _FNTFILIO_H_ */
diff --git a/nx-X11/lib/font/include/fntfilst.h b/nx-X11/lib/font/include/fntfilst.h
new file mode 100644
index 000000000..1a71eae7a
--- /dev/null
+++ b/nx-X11/lib/font/include/fntfilst.h
@@ -0,0 +1,198 @@
+/* $Xorg: fntfilst.h,v 1.5 2001/02/09 02:04:04 xorgcvs Exp $ */
+
+/*
+
+Copyright 1991, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE 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
+OPEN GROUP 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.8 2002/12/09 17:30:00 dawes Exp $ */
+
+/*
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#ifndef _FONTFILEST_H_
+#define _FONTFILEST_H_
+
+#ifndef FONTMODULE
+#include <X11/Xos.h>
+#endif
+#ifndef XP_PSTEXT
+#include <X11/fonts/fontmisc.h>
+#endif
+#include <X11/fonts/fontstruct.h>
+#include <X11/fonts/fontxlfd.h>
+#include <X11/fonts/fntfil.h>
+
+typedef struct _FontName {
+ char *name;
+ short length;
+ short ndashes;
+} FontNameRec;
+
+typedef struct _FontScaled {
+ FontScalableRec vals;
+ FontEntryPtr bitmap;
+ FontPtr pFont;
+} FontScaledRec;
+
+typedef struct _FontScalableExtra {
+ FontScalableRec defaults;
+ int numScaled;
+ int sizeScaled;
+ FontScaledPtr scaled;
+ pointer private;
+} FontScalableExtraRec;
+
+typedef struct _FontScalableEntry {
+ FontRendererPtr renderer;
+ char *fileName;
+ FontScalableExtraPtr extra;
+} FontScalableEntryRec;
+
+/*
+ * This "can't" work yet - the returned alias string must be permanent,
+ * but this layer would need to generate the appropriate name from the
+ * resolved scalable + the XLFD values passed in. XXX
+ */
+
+typedef struct _FontScaleAliasEntry {
+ char *resolved;
+} FontScaleAliasEntryRec;
+
+typedef struct _FontBitmapEntry {
+ FontRendererPtr renderer;
+ char *fileName;
+ FontPtr pFont;
+} FontBitmapEntryRec;
+
+typedef struct _FontAliasEntry {
+ char *resolved;
+} FontAliasEntryRec;
+
+typedef struct _FontBCEntry {
+ FontScalableRec vals;
+ FontEntryPtr entry;
+} FontBCEntryRec;
+
+typedef struct _FontEntry {
+ FontNameRec name;
+ int type;
+ union _FontEntryParts {
+ FontScalableEntryRec scalable;
+ FontBitmapEntryRec bitmap;
+ FontAliasEntryRec alias;
+ FontBCEntryRec bc;
+ } u;
+} FontEntryRec;
+
+typedef struct _FontTable {
+ int used;
+ int size;
+ FontEntryPtr entries;
+ Bool sorted;
+} FontTableRec;
+
+typedef struct _FontDirectory {
+ char *directory;
+ unsigned long dir_mtime;
+ unsigned long alias_mtime;
+ FontTableRec scalable;
+ FontTableRec nonScalable;
+ char *attributes;
+} FontDirectoryRec;
+
+/* Capability bits: for definition of capabilities bitmap in the
+ FontRendererRec to indicate support of XLFD enhancements */
+
+#define CAP_MATRIX 0x1
+#define CAP_CHARSUBSETTING 0x2
+
+typedef struct _FontRenderer {
+ char *fileSuffix;
+ int fileSuffixLen;
+ int (*OpenBitmap)(FontPathElementPtr /* fpe */,
+ FontPtr * /* pFont */,
+ int /* flags */,
+ FontEntryPtr /* entry */,
+ char * /* fileName */,
+ fsBitmapFormat /* format */,
+ fsBitmapFormatMask /* mask */,
+ FontPtr /* non_cachable_font */);
+ int (*OpenScalable)(FontPathElementPtr /* fpe */,
+ FontPtr * /* pFont */,
+ int /* flags */,
+ FontEntryPtr /* entry */,
+ char * /* fileName */,
+ FontScalablePtr /* vals */,
+ fsBitmapFormat /* format */,
+ fsBitmapFormatMask /* fmask */,
+ FontPtr /* non_cachable_font */);
+ int (*GetInfoBitmap)(FontPathElementPtr /* fpe */,
+ FontInfoPtr /* pFontInfo */,
+ FontEntryPtr /* entry */,
+ char * /*fileName */);
+ int (*GetInfoScalable)(FontPathElementPtr /* fpe */,
+ FontInfoPtr /* pFontInfo */,
+ FontEntryPtr /* entry */,
+ FontNamePtr /* fontName */,
+ char * /* fileName */,
+ FontScalablePtr /* vals */);
+ int number;
+ int capabilities; /* Bitmap components defined above */
+} FontRendererRec;
+
+typedef struct _FontRenders {
+ int number;
+ struct _FontRenderersElement {
+ /* In order to preserve backward compatibility, the
+ priority field is made invisible to renderers */
+ FontRendererPtr renderer;
+ int priority;
+ } *renderers;
+} FontRenderersRec, *FontRenderersPtr;
+
+typedef struct _BitmapInstance {
+ FontScalableRec vals;
+ FontBitmapEntryPtr bitmap;
+} BitmapInstanceRec, *BitmapInstancePtr;
+
+typedef struct _BitmapScalablePrivate {
+ int numInstances;
+ BitmapInstancePtr instances;
+} BitmapScalablePrivateRec, *BitmapScalablePrivatePtr;
+
+typedef struct _BitmapSources {
+ FontPathElementPtr *fpe;
+ int size;
+ int count;
+} BitmapSourcesRec, *BitmapSourcesPtr;
+
+extern BitmapSourcesRec FontFileBitmapSources;
+
+/* Defines for FontFileFindNamesInScalableDir() behavior */
+#define NORMAL_ALIAS_BEHAVIOR 0
+#define LIST_ALIASES_AND_TARGET_NAMES (1<<0)
+#define IGNORE_SCALABLE_ALIASES (1<<1)
+
+#endif /* _FONTFILEST_H_ */
diff --git a/nx-X11/lib/font/include/fontenc.h b/nx-X11/lib/font/include/fontenc.h
new file mode 100644
index 000000000..09472cfc5
--- /dev/null
+++ b/nx-X11/lib/font/include/fontenc.h
@@ -0,0 +1,124 @@
+/*
+Copyright (c) 1998-2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software 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 Software.
+
+THE SOFTWARE 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
+AUTHORS OR COPYRIGHT HOLDERS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+/* $XFree86: xc/lib/font/include/fontenc.h,v 1.7 2000/11/14 16:54:45 dawes Exp $ */
+
+/* Header for backend-independent encoding code */
+
+/* An encoding is identified with a name. An encoding contains some
+ global encoding data, such as its size, and a set of mappings.
+ Mappings are identified by their type and two integers, known as
+ pid and eid, the interpretation of which is type dependent. */
+
+#ifndef _FONTENC_H
+#define _FONTENC_H
+
+/* Encoding types. For future extensions, clients should be prepared
+ to ignore unknown encoding types. */
+
+/* 0 is treated specially. */
+
+#define FONT_ENCODING_UNICODE 1
+#define FONT_ENCODING_TRUETYPE 2
+#define FONT_ENCODING_POSTSCRIPT 3
+
+/* This structure represents a mapping, either from numeric codes from
+ numeric codes, or from numeric codes to strings. */
+
+/* It is expected that only one of `recode' and `name' will actually
+ be present. However, having both fields simplifies the interface
+ somewhat. */
+
+typedef struct _FontMap {
+ int type; /* the type of the mapping */
+ int pid, eid; /* the identification of the mapping */
+ unsigned (*recode)(unsigned, void*); /* mapping function */
+ char *(*name)(unsigned, void*); /* function returning glyph names */
+ void *client_data; /* second parameter of the two above */
+ struct _FontMap *next; /* link to next element in list */
+ /* The following was added for version 0.3 of the font interface. */
+ /* It should be kept at the end to preserve binary compatibility. */
+ struct _FontEnc *encoding;
+} FontMapRec, *FontMapPtr;
+
+/* This is the structure that holds all the info for one encoding. It
+ consists of a charset name, its size, and a linked list of mappings
+ like above. */
+
+typedef struct _FontEnc {
+ char *name; /* the name of the encoding */
+ char **aliases; /* its aliases, null terminated */
+ int size; /* its size, either in bytes or rows */
+ int row_size; /* the size of a row, or 0 if bytes */
+ FontMapPtr mappings; /* linked list of mappings */
+ struct _FontEnc *next; /* link to next element */
+ /* the following two were added in version 0.2 of the font interface */
+ /* they should be kept at the end to preserve binary compatibility */
+ int first; /* first byte or row */
+ int first_col; /* first column in each row */
+} FontEncRec, *FontEncPtr;
+
+typedef struct _FontMapReverse {
+ unsigned int (*reverse)(unsigned, void*);
+ void *data;
+} FontMapReverseRec, *FontMapReversePtr;
+
+
+/* Function prototypes */
+
+/* extract an encoding name from an XLFD name. Returns a pointer to a
+ *static* buffer, or NULL */
+char *FontEncFromXLFD(const char*, int);
+
+/* find the encoding data for a given encoding name; second parameter
+ is the filename of the font for which the encoding is needed.
+ Returns NULL on failure. */
+FontEncPtr FontEncFind(const char*, const char*);
+
+/* Find a given mapping for an encoding. This is only a convenience
+ function, as clients are allowed to scavenge the data structures
+ themselves (as the TrueType backend does). */
+
+FontMapPtr FontMapFind(FontEncPtr, int, int, int);
+
+/* Do both in a single step */
+FontMapPtr FontEncMapFind(const char *, int, int, int, const char *);
+
+/* Recode a code. Always succeeds. */
+unsigned FontEncRecode(unsigned, FontMapPtr);
+
+/* Return a name for a code. Returns a string or NULL. */
+char *FontEncName(unsigned, FontMapPtr);
+
+/* Return a pointer to the name of the system encodings directory. */
+/* This string is static and should not be modified. */
+char* FontEncDirectory(void);
+
+/* Identify an encoding file. If fileName doesn't exist, or is not an
+ encoding file, return NULL, otherwise returns a NULL-terminated
+ array of strings. */
+char **FontEncIdentify(const char *fileName);
+
+FontMapReversePtr FontMapReverse(FontMapPtr);
+
+void FontMapReverseFree(FontMapReversePtr);
+#endif
diff --git a/nx-X11/lib/font/include/fontencc.h b/nx-X11/lib/font/include/fontencc.h
new file mode 100644
index 000000000..51e0e1440
--- /dev/null
+++ b/nx-X11/lib/font/include/fontencc.h
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 1998-2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software 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 Software.
+
+THE SOFTWARE 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
+AUTHORS OR COPYRIGHT HOLDERS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+/* $XFree86$ */
+
+/* Binary compatibility entry points. */
+
+/* This file includes code to make modules compiled for earlier
+ versions of the fontenc interfaces link with this one. It does
+ *not* provide source compatibility, as many of the data structures
+ now have different names. */
+
+extern char *font_encoding_from_xlfd(const char*, int);
+extern unsigned font_encoding_recode(unsigned, FontEncPtr, FontMapPtr);
+extern FontEncPtr font_encoding_find(const char*, const char*);
+extern char *font_encoding_name(unsigned, FontEncPtr, FontMapPtr);
+extern char **identifyEncodingFile(const char *fileName);
+
diff --git a/nx-X11/lib/font/include/fontmisc.h b/nx-X11/lib/font/include/fontmisc.h
new file mode 100644
index 000000000..b7e359068
--- /dev/null
+++ b/nx-X11/lib/font/include/fontmisc.h
@@ -0,0 +1,133 @@
+/* $Xorg: fontmisc.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */
+
+/*
+
+Copyright 1991, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE 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
+OPEN GROUP 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/lib/font/include/fontmisc.h,v 3.16 2001/12/14 19:56:54 dawes Exp $ */
+
+/*
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#ifndef _FONTMISC_H_
+#define _FONTMISC_H_
+
+#ifndef FONTMODULE
+#include <X11/Xfuncs.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifndef X_NOT_POSIX
+#include <unistd.h>
+#else
+extern int close();
+#endif
+
+#endif /* FONTMODULE */
+
+#include "X11/Xdefs.h"
+
+
+#ifndef LSBFirst
+#define LSBFirst 0
+#define MSBFirst 1
+#endif
+
+#ifndef None
+#define None 0l
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+extern Atom MakeAtom ( char *string, unsigned len, int makeit );
+extern int ValidAtom ( Atom atom );
+extern char *NameForAtom (Atom atom);
+
+#ifndef _HAVE_XALLOC_DECLS
+#define _HAVE_XALLOC_DECLS
+extern pointer Xalloc(unsigned long);
+extern pointer Xrealloc(pointer, unsigned long);
+extern void Xfree(pointer);
+extern pointer Xcalloc(unsigned long);
+#endif
+extern int f_strcasecmp(const char *s1, const char *s2);
+
+#ifndef xalloc
+#define xalloc(n) Xalloc ((unsigned) n)
+#define xfree(p) Xfree ((pointer) p)
+#define xrealloc(p,n) Xrealloc ((pointer)p,n)
+#define xcalloc(n,s) Xcalloc((unsigned) n * (unsigned) s)
+#endif
+#define lowbit(x) ((x) & (~(x) + 1))
+
+#undef assert
+#define assert(x) ((void)0)
+
+#ifndef strcasecmp
+#if defined(NEED_STRCASECMP) && !defined(FONTMODULE)
+#define strcasecmp(s1,s2) f_strcasecmp(s1,s2)
+#endif
+#endif
+
+extern void
+BitOrderInvert(
+ register unsigned char *,
+ register int
+);
+
+extern void
+TwoByteSwap(
+ register unsigned char *,
+ register int
+);
+
+extern void
+FourByteSwap(
+ register unsigned char *,
+ register int
+);
+
+extern int
+RepadBitmap (
+ char*,
+ char*,
+ unsigned,
+ unsigned,
+ int,
+ int
+);
+
+extern void CopyISOLatin1Lowered(
+ char * /*dest*/,
+ char * /*source*/,
+ int /*length*/
+);
+
+extern void register_fpe_functions(void);
+
+#endif /* _FONTMISC_H_ */
diff --git a/nx-X11/lib/font/include/fontmod.h b/nx-X11/lib/font/include/fontmod.h
new file mode 100644
index 000000000..42d277fd4
--- /dev/null
+++ b/nx-X11/lib/font/include/fontmod.h
@@ -0,0 +1,16 @@
+/* $XFree86: xc/lib/font/include/fontmod.h,v 1.2 1998/07/25 06:57:09 dawes Exp $ */
+
+#ifndef _FONTMOD_H_
+#define _FONTMOD_H_
+
+typedef void (*InitFont)(void);
+
+typedef struct {
+ InitFont initFunc;
+ char * name;
+ pointer module;
+} FontModule;
+
+extern FontModule *FontModuleList;
+
+#endif /* _FONTMOD_H_ */
diff --git a/nx-X11/lib/font/include/fontshow.h b/nx-X11/lib/font/include/fontshow.h
new file mode 100644
index 000000000..5bb48fe18
--- /dev/null
+++ b/nx-X11/lib/font/include/fontshow.h
@@ -0,0 +1,37 @@
+/* $Xorg: fontshow.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */
+
+/*
+
+Copyright 1990, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE 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
+OPEN GROUP 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+/*
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#define FONT_SHOW_INFO (1<<0)
+#define FONT_SHOW_PROPS (1<<1)
+#define FONT_SHOW_METRICS (1<<2)
+#define FONT_SHOW_GLYPHS (1<<3)
+#define FONT_SHOW_ALL (FONT_SHOW_INFO|FONT_SHOW_PROPS|FONT_SHOW_GLYPHS)
diff --git a/nx-X11/lib/font/include/fontutil.h b/nx-X11/lib/font/include/fontutil.h
new file mode 100644
index 000000000..9a73eaa47
--- /dev/null
+++ b/nx-X11/lib/font/include/fontutil.h
@@ -0,0 +1,26 @@
+/* $XFree86: xc/lib/font/include/fontutil.h,v 1.1 1999/03/14 11:17:49 dawes Exp $ */
+
+#ifndef _FONTUTIL_H_
+#define _FONTUTIL_H_
+
+#include <X11/fonts/FSproto.h>
+
+extern int FontCouldBeTerminal(FontInfoPtr);
+extern int CheckFSFormat(fsBitmapFormat, fsBitmapFormatMask, int *, int *,
+ int *, int *, int *);
+extern void FontComputeInfoAccelerators(FontInfoPtr);
+
+extern void GetGlyphs ( FontPtr font, unsigned long count,
+ unsigned char *chars, FontEncoding fontEncoding,
+ unsigned long *glyphcount, CharInfoPtr *glyphs );
+extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo,
+ unsigned long count, ExtentInfoRec *info );
+extern Bool QueryTextExtents ( FontPtr pFont, unsigned long count,
+ unsigned char *chars, ExtentInfoRec *info );
+extern Bool ParseGlyphCachingMode ( char *str );
+extern void InitGlyphCaching ( void );
+extern void SetGlyphCachingMode ( int newmode );
+extern int add_range ( fsRange *newrange, int *nranges, fsRange **range,
+ Bool charset_subset );
+
+#endif /* _FONTUTIL_H_ */
diff --git a/nx-X11/lib/font/include/fontxlfd.h b/nx-X11/lib/font/include/fontxlfd.h
new file mode 100644
index 000000000..e87b93143
--- /dev/null
+++ b/nx-X11/lib/font/include/fontxlfd.h
@@ -0,0 +1,100 @@
+/* $Xorg: fontxlfd.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */
+
+/*
+
+Copyright 1990, 1994, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE 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 OPEN GROUP 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 SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+/* $XFree86: xc/lib/font/include/fontxlfd.h,v 1.5 2001/01/17 19:43:32 dawes Exp $ */
+
+/*
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+#ifndef _FONTXLFD_H_
+#define _FONTXLFD_H_
+
+#include <X11/fonts/FSproto.h>
+
+/* Constants for values_supplied bitmap */
+
+#define SIZE_SPECIFY_MASK 0xf
+
+#define PIXELSIZE_MASK 0x3
+#define PIXELSIZE_UNDEFINED 0
+#define PIXELSIZE_SCALAR 0x1
+#define PIXELSIZE_ARRAY 0x2
+#define PIXELSIZE_SCALAR_NORMALIZED 0x3 /* Adjusted for resolution */
+
+#define POINTSIZE_MASK 0xc
+#define POINTSIZE_UNDEFINED 0
+#define POINTSIZE_SCALAR 0x4
+#define POINTSIZE_ARRAY 0x8
+
+#define PIXELSIZE_WILDCARD 0x10
+#define POINTSIZE_WILDCARD 0x20
+
+#define ENHANCEMENT_SPECIFY_MASK 0x40
+
+#define CHARSUBSET_SPECIFIED 0x40
+
+#define EPS 1.0e-20
+#define XLFD_NDIGITS 3 /* Round numbers in pixel and
+ point arrays to this many
+ digits for repeatability */
+
+typedef struct _FontScalable {
+ int values_supplied; /* Bitmap identifying what advanced
+ capabilities or enhancements
+ were specified in the font name */
+ double pixel_matrix[4];
+ double point_matrix[4];
+
+ /* Pixel and point fields are deprecated in favor of the
+ transformation matrices. They are provided and filled in for the
+ benefit of rasterizers that do not handle the matrices. */
+
+ int pixel,
+ point;
+
+ int x,
+ y,
+ width;
+ char *xlfdName;
+ int nranges;
+ fsRange *ranges;
+} FontScalableRec, *FontScalablePtr;
+
+
+extern double xlfd_round_double ( double x );
+extern Bool FontParseXLFDName ( char *fname, FontScalablePtr vals, int subst );
+extern fsRange *FontParseRanges ( char *name, int *nranges );
+
+#define FONT_XLFD_REPLACE_NONE 0
+#define FONT_XLFD_REPLACE_STAR 1
+#define FONT_XLFD_REPLACE_ZERO 2
+#define FONT_XLFD_REPLACE_VALUE 3
+
+#endif /* _FONTXLFD_H_ */