1
/* $Xorg: fntfilst.h,v 1.5 2001/02/09 02:04:04 xorgcvs Exp $ */
5
Copyright 1991, 1998 The Open Group
7
Permission to use, copy, modify, distribute, and sell this software and its
8
documentation for any purpose is hereby granted without fee, provided that
9
the above copyright notice appear in all copies and that both that
10
copyright notice and this permission notice appear in supporting
13
The above copyright notice and this permission notice shall be included in
14
all copies or substantial portions of the Software.
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
Except as contained in this notice, the name of The Open Group shall not be
24
used in advertising or otherwise to promote the sale, use or other dealings
25
in this Software without prior written authorization from The Open Group.
28
/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.9 2002/12/10 22:23:52 tsi Exp $ */
31
* Author: Keith Packard, MIT X Consortium
34
#ifndef _FONTFILEST_H_
35
#define _FONTFILEST_H_
43
#include "fontstruct.h"
47
typedef struct _FontName {
53
typedef struct _FontScaled {
59
typedef struct _FontScalableExtra {
60
FontScalableRec defaults;
65
} FontScalableExtraRec;
67
typedef struct _FontScalableEntry {
68
FontRendererPtr renderer;
70
FontScalableExtraPtr extra;
71
} FontScalableEntryRec;
74
* This "can't" work yet - the returned alias string must be permanent,
75
* but this layer would need to generate the appropriate name from the
76
* resolved scalable + the XLFD values passed in. XXX
79
typedef struct _FontScaleAliasEntry {
81
} FontScaleAliasEntryRec;
83
typedef struct _FontBitmapEntry {
84
FontRendererPtr renderer;
89
typedef struct _FontAliasEntry {
93
typedef struct _FontBCEntry {
98
typedef struct _FontEntry {
101
union _FontEntryParts {
102
FontScalableEntryRec scalable;
103
FontBitmapEntryRec bitmap;
104
FontAliasEntryRec alias;
109
typedef struct _FontTable {
112
FontEntryPtr entries;
116
typedef struct _FontDirectory {
118
unsigned long dir_mtime;
119
unsigned long alias_mtime;
120
FontTableRec scalable;
121
FontTableRec nonScalable;
125
/* Capability bits: for definition of capabilities bitmap in the
126
FontRendererRec to indicate support of XLFD enhancements */
128
#define CAP_MATRIX 0x1
129
#define CAP_CHARSUBSETTING 0x2
131
typedef struct _FontRenderer {
134
int (*OpenBitmap)(FontPathElementPtr /* fpe */,
135
FontPtr * /* pFont */,
137
FontEntryPtr /* entry */,
138
char * /* fileName */,
139
fsBitmapFormat /* format */,
140
fsBitmapFormatMask /* mask */,
141
FontPtr /* non_cachable_font */);
142
int (*OpenScalable)(FontPathElementPtr /* fpe */,
143
FontPtr * /* pFont */,
145
FontEntryPtr /* entry */,
146
char * /* fileName */,
147
FontScalablePtr /* vals */,
148
fsBitmapFormat /* format */,
149
fsBitmapFormatMask /* fmask */,
150
FontPtr /* non_cachable_font */);
151
int (*GetInfoBitmap)(FontPathElementPtr /* fpe */,
152
FontInfoPtr /* pFontInfo */,
153
FontEntryPtr /* entry */,
154
char * /*fileName */);
155
int (*GetInfoScalable)(FontPathElementPtr /* fpe */,
156
FontInfoPtr /* pFontInfo */,
157
FontEntryPtr /* entry */,
158
FontNamePtr /* fontName */,
159
char * /* fileName */,
160
FontScalablePtr /* vals */);
162
int capabilities; /* Bitmap components defined above */
165
typedef struct _FontRenders {
167
struct _FontRenderersElement {
168
/* In order to preserve backward compatibility, the
169
priority field is made invisible to renderers */
170
FontRendererPtr renderer;
173
} FontRenderersRec, *FontRenderersPtr;
175
typedef struct _BitmapInstance {
176
FontScalableRec vals;
177
FontBitmapEntryPtr bitmap;
178
} BitmapInstanceRec, *BitmapInstancePtr;
180
typedef struct _BitmapScalablePrivate {
182
BitmapInstancePtr instances;
183
} BitmapScalablePrivateRec, *BitmapScalablePrivatePtr;
185
typedef struct _BitmapSources {
186
FontPathElementPtr *fpe;
189
} BitmapSourcesRec, *BitmapSourcesPtr;
191
extern BitmapSourcesRec FontFileBitmapSources;
193
/* Defines for FontFileFindNamesInScalableDir() behavior */
194
#define NORMAL_ALIAS_BEHAVIOR 0
195
#define LIST_ALIASES_AND_TARGET_NAMES (1<<0)
196
#define IGNORE_SCALABLE_ALIASES (1<<1)
198
#endif /* _FONTFILEST_H_ */