1 /* $XConsortium: font.h,v 1.8 91/07/19 21:03:49 rws Exp $ */
2 /***********************************************************
3 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
4 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
5 
6                         All Rights Reserved
7 
8 Permission to use, copy, modify, and distribute this software and its
9 documentation for any purpose and without fee is hereby granted,
10 provided that the above copyright notice appear in all copies and that
11 both that copyright notice and this permission notice appear in
12 supporting documentation, and that the names of Digital or MIT not be
13 used in advertising or publicity pertaining to distribution of the
14 software without specific, written prior permission.
15 
16 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
17 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
18 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
19 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22 SOFTWARE.
23 
24 ******************************************************************/
25 /* $NCDId: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */
26 
27 #ifndef FONT_H
28 #define FONT_H
29 
30 #ifndef BitmapFormatByteOrderMask
31 #include	"fsmasks.h"
32 #endif
33 
34 /* data structures */
35 typedef struct _Font *FontPtr;
36 typedef struct _FontInfo *FontInfoPtr;
37 typedef struct _FontProp *FontPropPtr;
38 typedef struct _ExtentInfo *ExtentInfoPtr;
39 typedef struct _FontPathElement *FontPathElementPtr;
40 typedef struct _CharInfo *CharInfoPtr;
41 typedef struct _FontNames *FontNamesPtr;
42 typedef struct _FontResolution *FontResolutionPtr;
43 
44 #define NullCharInfo	((CharInfoPtr) 0)
45 #define NullFont	((FontPtr) 0)
46 #define NullFontInfo	((FontInfoPtr) 0)
47 
48  /* draw direction */
49 #define LeftToRight 0
50 #define RightToLeft 1
51 #define BottomToTop 2
52 #define TopToBottom 3
53 typedef int DrawDirection;
54 
55 #define NO_SUCH_CHAR	-1
56 
57 
58 #define	FontAliasType	0x1000
59 
60 #define	AllocError	80
61 #define	StillWorking	81
62 #define	FontNameAlias	82
63 #define	BadFontName	83
64 #define	Suspended	84
65 #define	Successful	85
66 #define	BadFontPath	86
67 #define	BadCharRange	87
68 #define	BadFontFormat	88
69 #define	FPEResetFailed	89	/* for when an FPE reset won't work */
70 
71 /* OpenFont flags */
72 #define FontLoadInfo	0x0001
73 #define FontLoadProps	0x0002
74 #define FontLoadMetrics	0x0004
75 #define FontLoadBitmaps	0x0008
76 #define FontLoadAll	0x000f
77 #define	FontOpenSync	0x0010
78 
79 /* Query flags */
80 #define	LoadAll		0x1
81 #define	FinishRamge	0x2
82 #define       EightBitFont    0x4
83 #define       SixteenBitFont  0x8
84 
85 typedef char *closure;
86 
87 extern int  StartListFontsWithInfo( /* client, length, pattern, maxNames */ );
88 extern int  ListFonts( /* client, length, pattern, maxNames */ );
89 
90 extern FontNamesPtr MakeFontNamesRecord( /* size */ );
91 extern void FreeFontNames();
92 extern int  AddFontNamesName();
93 
94 extern int  FontToFSError();
95 
96 extern FontResolutionPtr GetClientResolution();
97 
98 typedef struct _FontPatternCache    *FontPatternCachePtr;
99 
100 extern FontPatternCachePtr  MakeFontPatternCache ();
101 extern void		    FreeFontPatternCache ();
102 extern void		    EmtpyFontPatternCache ();
103 extern void		    CacheFontPattern ();
104 extern FontPtr		    FindCachedFontPattern ();
105 extern void		    RemoveCachedFontPattern ();
106 
107 #endif				/* FONT_H */
108