1 | /* $Xorg: font.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
|
---|
2 | /***********************************************************
|
---|
3 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
4 |
|
---|
5 | All Rights Reserved
|
---|
6 |
|
---|
7 | Permission to use, copy, modify, and distribute this software and its
|
---|
8 | documentation for any purpose and without fee is hereby granted,
|
---|
9 | provided that the above copyright notice appear in all copies and that
|
---|
10 | both that copyright notice and this permission notice appear in
|
---|
11 | supporting documentation, and that the name of Digital not be
|
---|
12 | used in advertising or publicity pertaining to distribution of the
|
---|
13 | software without specific, written prior permission.
|
---|
14 |
|
---|
15 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
16 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
17 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
18 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
19 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
20 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
21 | SOFTWARE.
|
---|
22 |
|
---|
23 | ******************************************************************/
|
---|
24 | /* $XFree86: xc/include/fonts/font.h,v 3.5 2001/01/17 17:53:26 dawes Exp $ */
|
---|
25 | /* $NCDXorg: @(#)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 CACHE_16_BIT_GLYPHS
|
---|
100 | extern int glyphCachingMode;
|
---|
101 |
|
---|
102 | struct _Client;
|
---|
103 |
|
---|
104 | extern int StartListFontsWithInfo(
|
---|
105 | struct _Client * /*client*/,
|
---|
106 | int /*length*/,
|
---|
107 | unsigned char * /*pattern*/,
|
---|
108 | int /*max_names*/
|
---|
109 | );
|
---|
110 |
|
---|
111 | extern FontNamesPtr MakeFontNamesRecord(
|
---|
112 | unsigned /* size */
|
---|
113 | );
|
---|
114 |
|
---|
115 | extern void FreeFontNames(
|
---|
116 | FontNamesPtr /* pFN*/
|
---|
117 | );
|
---|
118 |
|
---|
119 | extern int AddFontNamesName(
|
---|
120 | FontNamesPtr /* names */,
|
---|
121 | char * /* name */,
|
---|
122 | int /* length */
|
---|
123 | );
|
---|
124 |
|
---|
125 | #if 0 /* unused */
|
---|
126 | extern int FontToFSError();
|
---|
127 | extern FontResolutionPtr GetClientResolution();
|
---|
128 | #endif
|
---|
129 |
|
---|
130 | typedef struct _FontPatternCache *FontPatternCachePtr;
|
---|
131 |
|
---|
132 | extern FontPatternCachePtr MakeFontPatternCache (
|
---|
133 | void
|
---|
134 | );
|
---|
135 |
|
---|
136 | extern void FreeFontPatternCache (
|
---|
137 | FontPatternCachePtr /* cache */
|
---|
138 | );
|
---|
139 |
|
---|
140 | extern void EmptyFontPatternCache (
|
---|
141 | FontPatternCachePtr /* cache */
|
---|
142 | );
|
---|
143 |
|
---|
144 | extern void CacheFontPattern (
|
---|
145 | FontPatternCachePtr /* cache */,
|
---|
146 | char * /* pattern */,
|
---|
147 | int /* patlen */,
|
---|
148 | FontPtr /* pFont */
|
---|
149 | );
|
---|
150 | extern FontResolutionPtr GetClientResolutions(
|
---|
151 | int * /* num */
|
---|
152 | );
|
---|
153 |
|
---|
154 | extern FontPtr FindCachedFontPattern (
|
---|
155 | FontPatternCachePtr /* cache */,
|
---|
156 | char * /* pattern */,
|
---|
157 | int /* patlen */
|
---|
158 | );
|
---|
159 |
|
---|
160 | extern void RemoveCachedFontPattern (
|
---|
161 | FontPatternCachePtr /* cache */,
|
---|
162 | FontPtr /* pFont */
|
---|
163 | );
|
---|
164 |
|
---|
165 | typedef enum {
|
---|
166 | Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit
|
---|
167 | } FontEncoding;
|
---|
168 |
|
---|
169 | #endif /* FONT_H */
|
---|