Back to index

tetex-bin  3.0
font.h
Go to the documentation of this file.
00001 /* $XConsortium: font.h,v 1.8 91/07/19 21:03:49 rws Exp $ */
00002 /***********************************************************
00003 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
00004 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
00005 
00006                         All Rights Reserved
00007 
00008 Permission to use, copy, modify, and distribute this software and its
00009 documentation for any purpose and without fee is hereby granted,
00010 provided that the above copyright notice appear in all copies and that
00011 both that copyright notice and this permission notice appear in
00012 supporting documentation, and that the names of Digital or MIT not be
00013 used in advertising or publicity pertaining to distribution of the
00014 software without specific, written prior permission.
00015 
00016 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
00017 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
00018 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
00019 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
00020 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
00021 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
00022 SOFTWARE.
00023 
00024 ******************************************************************/
00025 /* $NCDId: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */
00026 
00027 #ifndef FONT_H
00028 #define FONT_H
00029 
00030 #ifndef BitmapFormatByteOrderMask
00031 #include      "fsmasks.h"
00032 #endif
00033 
00034 /* data structures */
00035 typedef struct _Font *FontPtr;
00036 typedef struct _FontInfo *FontInfoPtr;
00037 typedef struct _FontProp *FontPropPtr;
00038 typedef struct _ExtentInfo *ExtentInfoPtr;
00039 typedef struct _FontPathElement *FontPathElementPtr;
00040 typedef struct _CharInfo *CharInfoPtr;
00041 typedef struct _FontNames *FontNamesPtr;
00042 typedef struct _FontResolution *FontResolutionPtr;
00043 
00044 #define NullCharInfo ((CharInfoPtr) 0)
00045 #define NullFont     ((FontPtr) 0)
00046 #define NullFontInfo ((FontInfoPtr) 0)
00047 
00048  /* draw direction */
00049 #define LeftToRight 0
00050 #define RightToLeft 1
00051 #define BottomToTop 2
00052 #define TopToBottom 3
00053 typedef int DrawDirection;
00054 
00055 #define NO_SUCH_CHAR -1
00056 
00057 
00058 #define       FontAliasType 0x1000
00059 
00060 #define       AllocError    80
00061 #define       StillWorking  81
00062 #define       FontNameAlias 82
00063 #define       BadFontName   83
00064 #define       Suspended     84
00065 #define       Successful    85
00066 #define       BadFontPath   86
00067 #define       BadCharRange  87
00068 #define       BadFontFormat 88
00069 #define       FPEResetFailed       89     /* for when an FPE reset won't work */
00070 
00071 /* OpenFont flags */
00072 #define FontLoadInfo 0x0001
00073 #define FontLoadProps       0x0002
00074 #define FontLoadMetrics     0x0004
00075 #define FontLoadBitmaps     0x0008
00076 #define FontLoadAll  0x000f
00077 #define       FontOpenSync  0x0010
00078 
00079 /* Query flags */
00080 #define       LoadAll              0x1
00081 #define       FinishRamge   0x2
00082 #define       EightBitFont    0x4
00083 #define       SixteenBitFont  0x8
00084 
00085 typedef char *closure;
00086 
00087 extern int  StartListFontsWithInfo( /* client, length, pattern, maxNames */ );
00088 extern int  ListFonts( /* client, length, pattern, maxNames */ );
00089 
00090 extern FontNamesPtr MakeFontNamesRecord( /* size */ );
00091 extern void FreeFontNames();
00092 extern int  AddFontNamesName();
00093 
00094 extern int  FontToFSError();
00095 
00096 extern FontResolutionPtr GetClientResolution();
00097 
00098 typedef struct _FontPatternCache    *FontPatternCachePtr;
00099 
00100 extern FontPatternCachePtr  MakeFontPatternCache ();
00101 extern void              FreeFontPatternCache ();
00102 extern void              EmtpyFontPatternCache ();
00103 extern void              CacheFontPattern ();
00104 extern FontPtr                  FindCachedFontPattern ();
00105 extern void              RemoveCachedFontPattern ();
00106 
00107 #endif                      /* FONT_H */