sync code with last improvements from OpenBSD

This commit is contained in:
purplerain 2023-08-28 05:57:34 +00:00
commit 88965415ff
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
26235 changed files with 29195616 additions and 0 deletions

View file

@ -0,0 +1,87 @@
/*
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.
*/
#ifndef BDFINT_H
#define BDFINT_H
#define bdfIsPrefix(buf,str) (!strncmp((char *)buf,str,strlen(str)))
#define bdfStrEqual(s1,s2) (!strcmp(s1,s2))
#define BDF_GENPROPS 6
#define NullProperty ((FontPropPtr)0)
/*
* This structure holds some properties we need to generate if they aren't
* specified in the BDF file and some other values read from the file
* that we'll need to calculate them. We need to keep track of whether
* or not we've read them.
*/
typedef struct BDFSTAT {
int linenum;
char *fileName;
char fontName[MAXFONTNAMELEN];
float pointSize;
int resolution_x;
int resolution_y;
int digitCount;
int digitWidths;
int exHeight;
FontPropPtr fontProp;
FontPropPtr pointSizeProp;
FontPropPtr resolutionXProp;
FontPropPtr resolutionYProp;
FontPropPtr resolutionProp;
FontPropPtr xHeightProp;
FontPropPtr weightProp;
FontPropPtr quadWidthProp;
BOOL haveFontAscent;
BOOL haveFontDescent;
BOOL haveDefaultCh;
} bdfFileState;
extern void bdfError ( const char * message, ... ) _X_ATTRIBUTE_PRINTF(1, 2);
extern void bdfWarning ( const char *message, ... ) _X_ATTRIBUTE_PRINTF(1, 2);
extern unsigned char * bdfGetLine ( FontFilePtr file, unsigned char *buf,
int len );
extern Atom bdfForceMakeAtom ( const char *str, int *size );
extern Atom bdfGetPropertyValue ( char *s );
extern int bdfIsInteger ( char *str );
extern unsigned char bdfHexByte ( unsigned char *s );
extern Bool bdfSpecialProperty ( FontPtr pFont, FontPropPtr prop,
char isString, bdfFileState *bdfState );
extern int bdfReadFont( FontPtr pFont, FontFilePtr file,
int bit, int byte, int glyph, int scan );
extern int bdfReadFontInfo( FontInfoPtr pFontInfo, FontFilePtr file );
extern void FontCharInkMetrics ( FontPtr pFont, CharInfoPtr pCI,
xCharInfo *pInk );
extern void FontCharReshape ( FontPtr pFont, CharInfoPtr pSrc,
CharInfoPtr pDst );
#endif /* BDFINT_H */

View file

@ -0,0 +1,101 @@
/*
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
*/
#ifndef _BITMAP_H_
#define _BITMAP_H_
#include <X11/fonts/fntfilio.h>
#include <stdio.h> /* just for NULL */
/*
* 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 void BitmapRegisterFontFileFunctions ( void );
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_ */

View file

@ -0,0 +1,83 @@
/*
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.
*/
#ifndef ___BUFIO_H___
#define ___BUFIO_H___ 1
#include <X11/Xfuncproto.h>
#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
#ifdef X_BZIP2_FONT_COMPRESSION
extern BufFilePtr BufFilePushBZIP2 ( BufFilePtr );
#endif
extern int BufFileClose ( BufFilePtr, int );
extern int BufFileRead ( BufFilePtr, char*, int );
extern int BufFileWrite ( BufFilePtr, const char*, int );
#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___ */

View file

@ -0,0 +1,176 @@
/*
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.
*/
/*
* 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 _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 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 MAXFONTNAMELEN 1024
#define MAXFONTFILENAMELEN 1024
#define FontDirFile "fonts.dir"
#define FontAliasFile "fonts.alias"
#define FontScalableFile "fonts.scale"
extern int FontFileNameCheck ( const 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, const 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,
const char *pat, int len, int max,
FontNamesPtr names );
extern int FontFileStartListFonts ( pointer client, FontPathElementPtr fpe,
const char *pat, int len, int max,
pointer *privatep, int mark_aliases );
extern int FontFileStartListFontsWithInfo ( pointer client,
FontPathElementPtr fpe,
const 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,
const 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 void CatalogueRegisterLocalFpeFunctions ( 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 ( const 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 ( const char *directory, FontDirectoryPtr *pdir );
extern Bool FontFileDirectoryChanged ( FontDirectoryPtr dir );
#endif /* _FONTFILE_H_ */

View file

@ -0,0 +1,53 @@
/*
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.
*/
/*
* 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_ */

View file

@ -0,0 +1,187 @@
/*
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.
*/
/*
* Author: Keith Packard, MIT X Consortium
*/
#ifndef _FONTFILEST_H_
#define _FONTFILEST_H_
#include <X11/Xos.h>
#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 _FontEntry {
FontNameRec name;
int type;
union _FontEntryParts {
FontScalableEntryRec scalable;
FontBitmapEntryRec bitmap;
FontAliasEntryRec alias;
} 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 {
const 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_ */

View file

@ -0,0 +1,35 @@
/*
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.
*/
/* 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);

View file

@ -0,0 +1,100 @@
/*
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.
*/
/*
* Author: Keith Packard, MIT X Consortium
*/
#ifndef _FONTMISC_H_
#define _FONTMISC_H_
#include <X11/Xfuncs.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#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 ( const char *string, unsigned len, int makeit );
extern int ValidAtom ( Atom atom );
extern const char *NameForAtom (Atom atom);
#define lowbit(x) ((x) & (~(x) + 1))
#undef assert
#define assert(x) ((void)0)
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*/,
const char * /*source*/,
int /*length*/
);
extern void register_fpe_functions(void);
#endif /* _FONTMISC_H_ */

View file

@ -0,0 +1,35 @@
/*
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)

View file

@ -0,0 +1,26 @@
#ifndef _FONTUTIL_H_
#define _FONTUTIL_H_
#include <X11/fonts/FSproto.h>
#if 0
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
#endif /* _FONTUTIL_H_ */

View file

@ -0,0 +1,97 @@
/*
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.
*/
/*
* 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_ */

View file

@ -0,0 +1,163 @@
/*
* Copyright © 2015 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 the copyright holders not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no representations
* about the suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS 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.
*/
#ifndef _LIBXFONT2_H_
#define _LIBXFONT2_H_
#include <stdarg.h>
#include <stdint.h>
#include <X11/Xfuncproto.h>
#include <X11/fonts/font.h>
#define XFONT2_FPE_FUNCS_VERSION 1
typedef int (*WakeupFpe) (FontPathElementPtr fpe);
typedef struct _xfont2_fpe_funcs {
int version;
NameCheckFunc name_check;
InitFpeFunc init_fpe;
FreeFpeFunc free_fpe;
ResetFpeFunc reset_fpe;
OpenFontFunc open_font;
CloseFontFunc close_font;
ListFontsFunc list_fonts;
StartLfwiFunc start_list_fonts_with_info;
NextLfwiFunc list_next_font_with_info;
WakeupFpe wakeup_fpe;
ClientDiedFunc client_died;
LoadGlyphsFunc load_glyphs;
StartLaFunc start_list_fonts_and_aliases;
NextLaFunc list_next_font_or_alias;
SetPathFunc set_path_hook;
} xfont2_fpe_funcs_rec, *xfont2_fpe_funcs_ptr;
typedef void (*FontBlockHandlerProcPtr) (void *timeout);
typedef void (*FontFdHandlerProcPtr) (int fd, void *data);
#define XFONT2_CLIENT_FUNCS_VERSION 1
typedef struct _xfont2_client_funcs {
int version;
int (*client_auth_generation)(ClientPtr client);
Bool (*client_signal)(ClientPtr client);
void (*delete_font_client_id)(Font id);
void (*verrorf)(const char *f, va_list ap) _X_ATTRIBUTE_PRINTF(1,0);
FontPtr (*find_old_font)(FSID id);
FontResolutionPtr (*get_client_resolutions)(int *num);
int (*get_default_point_size)(void);
Font (*get_new_font_client_id)(void);
uint32_t (*get_time_in_millis)(void);
int (*init_fs_handlers)(FontPathElementPtr fpe,
FontBlockHandlerProcPtr block_handler);
int (*register_fpe_funcs)(const xfont2_fpe_funcs_rec *funcs);
void (*remove_fs_handlers)(FontPathElementPtr fpe,
FontBlockHandlerProcPtr block_handler,
Bool all );
void *(*get_server_client)(void);
int (*set_font_authorizations)(char **authorizations,
int *authlen, void *client);
int (*store_font_client_font)(FontPtr pfont, Font id);
Atom (*make_atom)(const char *string, unsigned len, int makeit);
int (*valid_atom)(Atom atom);
const char *(*name_for_atom)(Atom atom);
unsigned long (*get_server_generation)(void);
int (*add_fs_fd)(int fd, FontFdHandlerProcPtr handler, void *data);
void (*remove_fs_fd)(int fd);
void (*adjust_fs_wait_for_delay)(void *wt, unsigned long newdelay);
} xfont2_client_funcs_rec, *xfont2_client_funcs_ptr;
_X_EXPORT int
xfont2_init(xfont2_client_funcs_rec const *client_funcs);
_X_EXPORT void
xfont2_query_glyph_extents(FontPtr pFont, CharInfoPtr *charinfo,
unsigned long count, ExtentInfoRec *info);
_X_EXPORT Bool
xfont2_query_text_extents(FontPtr pFont, unsigned long count,
unsigned char *chars, ExtentInfoRec *info);
_X_EXPORT Bool
xfont2_parse_glyph_caching_mode(char *str);
_X_EXPORT void
xfont2_init_glyph_caching(void);
_X_EXPORT void
xfont2_set_glyph_caching_mode(int newmode);
_X_EXPORT FontNamesPtr
xfont2_make_font_names_record(unsigned size);
_X_EXPORT void
xfont2_free_font_names(FontNamesPtr pFN);
_X_EXPORT int
xfont2_add_font_names_name(FontNamesPtr names,
char *name,
int length);
typedef struct _xfont2_pattern_cache *xfont2_pattern_cache_ptr;
_X_EXPORT xfont2_pattern_cache_ptr
xfont2_make_font_pattern_cache(void);
_X_EXPORT void
xfont2_free_font_pattern_cache(xfont2_pattern_cache_ptr cache);
_X_EXPORT void
xfont2_empty_font_pattern_cache(xfont2_pattern_cache_ptr cache);
_X_EXPORT void
xfont2_cache_font_pattern(xfont2_pattern_cache_ptr cache,
const char * pattern,
int patlen,
FontPtr pFont);
_X_EXPORT FontPtr
xfont2_find_cached_font_pattern(xfont2_pattern_cache_ptr cache,
const char * pattern,
int patlen);
_X_EXPORT void
xfont2_remove_cached_font_pattern(xfont2_pattern_cache_ptr cache,
FontPtr pFont);
/* private.c */
_X_EXPORT int
xfont2_allocate_font_private_index (void);
static inline void *
xfont2_font_get_private(FontPtr pFont, int n)
{
if (n > pFont->maxPrivate)
return NULL;
return pFont->devPrivates[n];
}
_X_EXPORT Bool
xfont2_font_set_private(FontPtr pFont, int n, void *ptr);
#endif /* _LIBXFONT2_H_ */

View file

@ -0,0 +1,97 @@
/*
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.
*/
/*
* Author: Keith Packard, MIT X Consortium
*/
#ifndef _PCF_H_
#define _PCF_H_
#include <X11/fonts/fntfilio.h>
/*
* Information used to read/write PCF fonts
*/
typedef struct _PCFTable {
CARD32 type;
CARD32 format;
CARD32 size;
CARD32 offset;
} PCFTableRec, *PCFTablePtr;
#define PCF_FILE_VERSION (('p'<<24)|('c'<<16)|('f'<<8)|1)
#define PCF_FORMAT_MASK 0xffffff00
#define PCF_DEFAULT_FORMAT 0x00000000
#define PCF_INKBOUNDS 0x00000200
#define PCF_ACCEL_W_INKBOUNDS 0x00000100
#define PCF_COMPRESSED_METRICS 0x00000100
#define PCF_FORMAT_MATCH(a,b) (((a)&PCF_FORMAT_MASK) == ((b)&PCF_FORMAT_MASK))
#define PCF_GLYPH_PAD_MASK (3<<0)
#define PCF_BYTE_MASK (1<<2)
#define PCF_BIT_MASK (1<<3)
#define PCF_SCAN_UNIT_MASK (3<<4)
#define PCF_BYTE_ORDER(f) (((f) & PCF_BYTE_MASK)?MSBFirst:LSBFirst)
#define PCF_BIT_ORDER(f) (((f) & PCF_BIT_MASK)?MSBFirst:LSBFirst)
#define PCF_GLYPH_PAD_INDEX(f) ((f) & PCF_GLYPH_PAD_MASK)
#define PCF_GLYPH_PAD(f) (1<<PCF_GLYPH_PAD_INDEX(f))
#define PCF_SCAN_UNIT_INDEX(f) (((f) & PCF_SCAN_UNIT_MASK) >> 4)
#define PCF_SCAN_UNIT(f) (1<<PCF_SCAN_UNIT_INDEX(f))
#define PCF_FORMAT_BITS(f) ((f) & (PCF_GLYPH_PAD_MASK|PCF_BYTE_MASK|PCF_BIT_MASK|PCF_SCAN_UNIT_MASK))
#define PCF_SIZE_TO_INDEX(s) ((s) == 4 ? 2 : (s) == 2 ? 1 : 0)
#define PCF_INDEX_TO_SIZE(b) (1<<b)
#define PCF_FORMAT(bit,byte,glyph,scan) (\
(PCF_SIZE_TO_INDEX(scan) << 4) | \
(((bit) == MSBFirst ? 1 : 0) << 3) | \
(((byte) == MSBFirst ? 1 : 0) << 2) | \
(PCF_SIZE_TO_INDEX(glyph) << 0))
#define PCF_PROPERTIES (1<<0)
#define PCF_ACCELERATORS (1<<1)
#define PCF_METRICS (1<<2)
#define PCF_BITMAPS (1<<3)
#define PCF_INK_METRICS (1<<4)
#define PCF_BDF_ENCODINGS (1<<5)
#define PCF_SWIDTHS (1<<6)
#define PCF_GLYPH_NAMES (1<<7)
#define PCF_BDF_ACCELERATORS (1<<8)
extern int pcfReadFont ( FontPtr pFont, FontFilePtr file,
int bit, int byte, int glyph, int scan );
extern int pcfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file );
extern int pcfWriteFont ( FontPtr pFont, FontFilePtr file );
extern void pcfError ( const char *, ... ) _X_ATTRIBUTE_PRINTF(1, 2);
#endif /* _PCF_H_ */