]> git.sesse.net Git - rdpsrv/blob - Xserver/include/fonts/font.h
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / include / fonts / font.h
1 /* $XConsortium: font.h /main/14 1996/09/28 16:32:33 rws $ */
2 /* $XFree86: xc/include/fonts/font.h,v 3.2 1997/01/14 22:13:06 dawes Exp $ */
3 /***********************************************************
4 Copyright 1987 by Digital Equipment Corporation, Maynard, 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 name of Digital 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 #ifndef _XTYPEDEF_FONTPTR
36 typedef struct _Font *FontPtr;
37 #define _XTYPEDEF_FONTPTR
38 #endif
39
40 typedef struct _FontInfo *FontInfoPtr;
41 typedef struct _FontProp *FontPropPtr;
42 typedef struct _ExtentInfo *ExtentInfoPtr;
43 typedef struct _FontPathElement *FontPathElementPtr;
44
45 #ifndef _XTYPEDEF_CHARINFOPTR
46 typedef struct _CharInfo *CharInfoPtr;
47 #define _XTYPEDEF_CHARINFOPTR
48 #endif
49
50 typedef struct _FontNames *FontNamesPtr;
51 typedef struct _FontResolution *FontResolutionPtr;
52
53 #define NullCharInfo    ((CharInfoPtr) 0)
54 #define NullFont        ((FontPtr) 0)
55 #define NullFontInfo    ((FontInfoPtr) 0)
56
57  /* draw direction */
58 #define LeftToRight 0
59 #define RightToLeft 1
60 #define BottomToTop 2
61 #define TopToBottom 3
62 typedef int DrawDirection;
63
64 #define NO_SUCH_CHAR    -1
65
66
67 #define FontAliasType   0x1000
68
69 #define AllocError      80
70 #define StillWorking    81
71 #define FontNameAlias   82
72 #define BadFontName     83
73 #define Suspended       84
74 #define Successful      85
75 #define BadFontPath     86
76 #define BadCharRange    87
77 #define BadFontFormat   88
78 #define FPEResetFailed  89      /* for when an FPE reset won't work */
79
80 /* OpenFont flags */
81 #define FontLoadInfo    0x0001
82 #define FontLoadProps   0x0002
83 #define FontLoadMetrics 0x0004
84 #define FontLoadBitmaps 0x0008
85 #define FontLoadAll     0x000f
86 #define FontOpenSync    0x0010
87 #define FontReopen      0x0020
88
89 /* Query flags */
90 #define LoadAll         0x1
91 #define FinishRamge     0x2
92 #define       EightBitFont    0x4
93 #define       SixteenBitFont  0x8
94
95 /* Glyph Caching Modes */
96 #define CACHING_OFF 0
97 #define CACHE_16_BIT_GLYPHS 1
98 #define CACHE_ALL_GLYPHS 2
99 #define DEFAULT_GLYPH_CACHING_MODE CACHING_OFF
100 extern int glyphCachingMode;
101
102 extern int StartListFontsWithInfo(
103 #if NeedFunctionPrototypes
104     ClientPtr /*client*/,
105     int /*length*/,
106     unsigned char */*pattern*/,
107     int /*max_names*/
108 #endif
109 );
110
111 extern FontNamesPtr MakeFontNamesRecord(
112 #if NeedFunctionPrototypes
113     unsigned /* size */
114 #endif
115 );
116
117 extern void FreeFontNames(
118 #if NeedFunctionPrototypes
119     FontNamesPtr /* pFN*/
120 #endif
121 );
122
123 extern int  AddFontNamesName(
124 #if NeedFunctionPrototypes
125     FontNamesPtr /* names */,
126     char * /* name */,
127     int /* length */
128 #endif
129 );
130
131 #if 0 /* unused */
132 extern int  FontToFSError();
133 extern FontResolutionPtr GetClientResolution();
134 #endif
135
136 typedef struct _FontPatternCache    *FontPatternCachePtr;
137
138 extern FontPatternCachePtr  MakeFontPatternCache (
139 #if NeedFunctionPrototypes
140     void
141 #endif
142 );
143
144 extern void                 FreeFontPatternCache (
145 #if NeedFunctionPrototypes
146     FontPatternCachePtr /* cache */
147 #endif
148 );
149
150 extern void                 EmptyFontPatternCache (
151 #if NeedFunctionPrototypes
152     FontPatternCachePtr /* cache */
153 #endif
154 );
155
156 extern void                 CacheFontPattern (
157 #if NeedFunctionPrototypes
158     FontPatternCachePtr /* cache */,
159     char * /* pattern */,
160     int /* patlen */,
161     FontPtr /* pFont */
162 #endif
163 );
164 extern FontResolutionPtr GetClientResolutions(
165 #if NeedFunctionPrototypes
166     int * /* num */
167 #endif
168 );
169
170 extern FontPtr              FindCachedFontPattern (
171 #if NeedFunctionPrototypes
172     FontPatternCachePtr /* cache */,
173     char * /* pattern */,
174     int /* patlen */
175 #endif
176 );
177
178 extern void                 RemoveCachedFontPattern (
179 #if NeedFunctionPrototypes
180     FontPatternCachePtr /* cache */,
181     FontPtr /* pFont */
182 #endif
183 );
184
185 typedef enum {
186     Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit
187 }           FontEncoding;
188
189 #endif                          /* FONT_H */