diff options
author | marha <marha@users.sourceforge.net> | 2009-06-28 22:07:26 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-06-28 22:07:26 +0000 |
commit | 3562e78743202e43aec8727005182a2558117eca (patch) | |
tree | 8f9113a77d12470c5c851a2a8e4cb02e89df7d43 /libXfont/include | |
download | vcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.gz vcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.bz2 vcxsrv-3562e78743202e43aec8727005182a2558117eca.zip |
Checked in the following released items:
xkeyboard-config-1.4.tar.gz
ttf-bitstream-vera-1.10.tar.gz
font-alias-1.0.1.tar.gz
font-sun-misc-1.0.0.tar.gz
font-sun-misc-1.0.0.tar.gz
font-sony-misc-1.0.0.tar.gz
font-schumacher-misc-1.0.0.tar.gz
font-mutt-misc-1.0.0.tar.gz
font-misc-misc-1.0.0.tar.gz
font-misc-meltho-1.0.0.tar.gz
font-micro-misc-1.0.0.tar.gz
font-jis-misc-1.0.0.tar.gz
font-isas-misc-1.0.0.tar.gz
font-dec-misc-1.0.0.tar.gz
font-daewoo-misc-1.0.0.tar.gz
font-cursor-misc-1.0.0.tar.gz
font-arabic-misc-1.0.0.tar.gz
font-winitzki-cyrillic-1.0.0.tar.gz
font-misc-cyrillic-1.0.0.tar.gz
font-cronyx-cyrillic-1.0.0.tar.gz
font-screen-cyrillic-1.0.1.tar.gz
font-xfree86-type1-1.0.1.tar.gz
font-adobe-utopia-type1-1.0.1.tar.gz
font-ibm-type1-1.0.0.tar.gz
font-bitstream-type1-1.0.0.tar.gz
font-bitstream-speedo-1.0.0.tar.gz
font-bh-ttf-1.0.0.tar.gz
font-bh-type1-1.0.0.tar.gz
font-bitstream-100dpi-1.0.0.tar.gz
font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz
font-bh-100dpi-1.0.0.tar.gz
font-adobe-utopia-100dpi-1.0.1.tar.gz
font-adobe-100dpi-1.0.0.tar.gz
font-util-1.0.1.tar.gz
font-bitstream-75dpi-1.0.0.tar.gz
font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz
font-adobe-utopia-75dpi-1.0.1.tar.gz
font-bh-75dpi-1.0.0.tar.gz
bdftopcf-1.0.1.tar.gz
font-adobe-75dpi-1.0.0.tar.gz
mkfontscale-1.0.6.tar.gz
openssl-0.9.8k.tar.gz
bigreqsproto-1.0.2.tar.gz
xtrans-1.2.2.tar.gz
resourceproto-1.0.2.tar.gz
inputproto-1.4.4.tar.gz
compositeproto-0.4.tar.gz
damageproto-1.1.0.tar.gz
zlib-1.2.3.tar.gz
xkbcomp-1.0.5.tar.gz
freetype-2.3.9.tar.gz
pthreads-w32-2-8-0-release.tar.gz
pixman-0.12.0.tar.gz
kbproto-1.0.3.tar.gz
evieext-1.0.2.tar.gz
fixesproto-4.0.tar.gz
recordproto-1.13.2.tar.gz
randrproto-1.2.2.tar.gz
scrnsaverproto-1.1.0.tar.gz
renderproto-0.9.3.tar.gz
xcmiscproto-1.1.2.tar.gz
fontsproto-2.0.2.tar.gz
xextproto-7.0.3.tar.gz
xproto-7.0.14.tar.gz
libXdmcp-1.0.2.tar.gz
libxkbfile-1.0.5.tar.gz
libfontenc-1.0.4.tar.gz
libXfont-1.3.4.tar.gz
libX11-1.1.5.tar.gz
libXau-1.0.4.tar.gz
libxcb-1.1.tar.gz
xorg-server-1.5.3.tar.gz
Diffstat (limited to 'libXfont/include')
-rw-r--r-- | libXfont/include/X11/fonts/bdfint.h | 90 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/bitmap.h | 109 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/bufio.h | 93 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fntfil.h | 182 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fntfilio.h | 56 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fntfilst.h | 198 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontconf.h.in | 55 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontencc.h | 36 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontmisc.h | 133 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontmod.h | 16 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontshow.h | 37 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontutil.h | 26 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontxlfd.h | 100 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/pcf.h | 102 |
14 files changed, 1233 insertions, 0 deletions
diff --git a/libXfont/include/X11/fonts/bdfint.h b/libXfont/include/X11/fonts/bdfint.h new file mode 100644 index 000000000..d41c4a556 --- /dev/null +++ b/libXfont/include/X11/fonts/bdfint.h @@ -0,0 +1,90 @@ +/* $Xorg: bdfint.h,v 1.4 2001/02/09 02:04:01 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/bitmap/bdfint.h,v 1.4 2001/01/17 19:43:26 dawes Exp $ */ + +#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 ( char * message, ... ); +extern void bdfWarning ( char *message, ... ); +extern unsigned char * bdfGetLine ( FontFilePtr file, unsigned char *buf, + int len ); +extern Atom bdfForceMakeAtom ( 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 */ diff --git a/libXfont/include/X11/fonts/bitmap.h b/libXfont/include/X11/fonts/bitmap.h new file mode 100644 index 000000000..731c85f5b --- /dev/null +++ b/libXfont/include/X11/fonts/bitmap.h @@ -0,0 +1,109 @@ +/* $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 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/libXfont/include/X11/fonts/bufio.h b/libXfont/include/X11/fonts/bufio.h new file mode 100644 index 000000000..b5977b1d0 --- /dev/null +++ b/libXfont/include/X11/fonts/bufio.h @@ -0,0 +1,93 @@ +/* $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 +#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, 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___ */ + diff --git a/libXfont/include/X11/fonts/fntfil.h b/libXfont/include/X11/fonts/fntfil.h new file mode 100644 index 000000000..074f2d0ea --- /dev/null +++ b/libXfont/include/X11/fonts/fntfil.h @@ -0,0 +1,182 @@ +/* $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 FontFileStartListFonts ( pointer client, FontPathElementPtr fpe, + char *pat, int len, int max, + pointer *privatep, int mark_aliases ); +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 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 ( 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/libXfont/include/X11/fonts/fntfilio.h b/libXfont/include/X11/fonts/fntfilio.h new file mode 100644 index 000000000..f8e24f390 --- /dev/null +++ b/libXfont/include/X11/fonts/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/libXfont/include/X11/fonts/fntfilst.h b/libXfont/include/X11/fonts/fntfilst.h new file mode 100644 index 000000000..1a71eae7a --- /dev/null +++ b/libXfont/include/X11/fonts/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/libXfont/include/X11/fonts/fontconf.h.in b/libXfont/include/X11/fonts/fontconf.h.in new file mode 100644 index 000000000..f12081d22 --- /dev/null +++ b/libXfont/include/X11/fonts/fontconf.h.in @@ -0,0 +1,55 @@ +/* + * Copyright © 2005 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. + */ + +/* Define as 1 if you have FreeType support in Xfont */ +#undef XFONT_FREETYPE + +/* Define as 1 if you have Type1 font support in Xfont */ +#undef XFONT_TYPE1 + +/* Define as 1 if you have Speedo support in Xfont */ +#undef XFONT_SPEEDO + +/* Define as 1 if you have builtin font support in Xfont */ +#undef XFONT_BUILTINS + +/* Define as 1 if you have pcf font support in Xfont */ +#undef XFONT_PCFFORMAT + +/* Define as 1 if you have bdf font support in Xfont */ +#undef XFONT_BDFFORMAT + +/* Define as 1 if you have snf font support in Xfont */ +#undef XFONT_SNFFORMAT + +/* Define as 1 if you have bitmap font support in Xfont */ +#undef XFONT_BITMAP + +/* Define as 1 if you have fontfile support in Xfont */ +#undef XFONT_FONTFILE + +/* Define as 1 if you have font cache support in Xfont */ +#undef XFONT_FONTCACHE + +/* Define as 1 if you have X Font Services Protocol support in Xfont */ +#undef XFONT_FC + diff --git a/libXfont/include/X11/fonts/fontencc.h b/libXfont/include/X11/fonts/fontencc.h new file mode 100644 index 000000000..51e0e1440 --- /dev/null +++ b/libXfont/include/X11/fonts/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/libXfont/include/X11/fonts/fontmisc.h b/libXfont/include/X11/fonts/fontmisc.h new file mode 100644 index 000000000..7b8651706 --- /dev/null +++ b/libXfont/include/X11/fonts/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/libXfont/include/X11/fonts/fontmod.h b/libXfont/include/X11/fonts/fontmod.h new file mode 100644 index 000000000..42d277fd4 --- /dev/null +++ b/libXfont/include/X11/fonts/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/libXfont/include/X11/fonts/fontshow.h b/libXfont/include/X11/fonts/fontshow.h new file mode 100644 index 000000000..5bb48fe18 --- /dev/null +++ b/libXfont/include/X11/fonts/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/libXfont/include/X11/fonts/fontutil.h b/libXfont/include/X11/fonts/fontutil.h new file mode 100644 index 000000000..9a73eaa47 --- /dev/null +++ b/libXfont/include/X11/fonts/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/libXfont/include/X11/fonts/fontxlfd.h b/libXfont/include/X11/fonts/fontxlfd.h new file mode 100644 index 000000000..e87b93143 --- /dev/null +++ b/libXfont/include/X11/fonts/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_ */ diff --git a/libXfont/include/X11/fonts/pcf.h b/libXfont/include/X11/fonts/pcf.h new file mode 100644 index 000000000..673e18449 --- /dev/null +++ b/libXfont/include/X11/fonts/pcf.h @@ -0,0 +1,102 @@ +/* $Xorg: pcf.h,v 1.4 2001/02/09 02:04:02 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/bitmap/pcf.h,v 1.4 2001/12/14 19:56:47 dawes Exp $ */ + +/* + * 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 pmfReadFont ( FontPtr pFont, FontFilePtr file, + int bit, int byte, int glyph, int scan ); +extern int pcfWriteFont ( FontPtr pFont, FontFilePtr file ); +extern void pcfError ( const char *, ... ); + +#endif /* _PCF_H_ */ |