1 /* $XConsortium: fntfilst.h,v 1.8 94/04/17 20:17:29 gildea Exp $ */
2 /* $XFree86: xc/lib/font/include/fntfilst.h,v 3.0 1995/11/16 11:03:45 dawes Exp $ */
6 Copyright (c) 1991 X Consortium
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 Except as contained in this notice, the name of the X Consortium shall not be
26 used in advertising or otherwise to promote the sale, use or other dealings
27 in this Software without prior written authorization from the X Consortium.
32 * Author: Keith Packard, MIT X Consortium
35 #ifndef _FONTFILEST_H_
36 #define _FONTFILEST_H_
40 #include "fontstruct.h"
44 typedef struct _FontName {
50 typedef struct _FontScaled {
56 typedef struct _FontScalableExtra {
57 FontScalableRec defaults;
62 } FontScalableExtraRec;
64 typedef struct _FontScalableEntry {
65 FontRendererPtr renderer;
67 FontScalableExtraPtr extra;
68 } FontScalableEntryRec;
71 * This "can't" work yet - the returned alias string must be permanent,
72 * but this layer would need to generate the appropriate name from the
73 * resolved scalable + the XLFD values passed in. XXX
76 typedef struct _FontScaleAliasEntry {
78 } FontScaleAliasEntryRec;
80 typedef struct _FontBitmapEntry {
81 FontRendererPtr renderer;
86 typedef struct _FontAliasEntry {
90 typedef struct _FontBCEntry {
95 typedef struct _FontEntry {
98 union _FontEntryParts {
99 FontScalableEntryRec scalable;
100 FontBitmapEntryRec bitmap;
101 FontAliasEntryRec alias;
106 typedef struct _FontTable {
109 FontEntryPtr entries;
113 typedef struct _FontDirectory {
115 unsigned long dir_mtime;
116 unsigned long alias_mtime;
117 FontTableRec scalable;
118 FontTableRec nonScalable;
122 /* Capability bits: for definition of capabilities bitmap in the
123 FontRendererRec to indicate support of XLFD enhancements */
125 #define CAP_MATRIX 0x1
126 #define CAP_CHARSUBSETTING 0x2
128 typedef struct _FontRenderer {
131 int (*OpenBitmap)(/* fpe, pFont, flags, entry, fileName, format, fmask */);
132 int (*OpenScalable)(/* fpe, pFont, flags, entry, fileName, vals, format, fmask */);
133 int (*GetInfoBitmap)(/* fpe, pFontInfo, entry, fileName */);
134 int (*GetInfoScalable)(/* fpe, pFontInfo, entry, fileName, vals */);
136 int capabilities; /* Bitmap components defined above */
139 typedef struct _FontRenders {
141 FontRendererPtr *renderers;
142 } FontRenderersRec, *FontRenderersPtr;
144 typedef struct _BitmapInstance {
145 FontScalableRec vals;
146 FontBitmapEntryPtr bitmap;
147 } BitmapInstanceRec, *BitmapInstancePtr;
149 typedef struct _BitmapScalablePrivate {
151 BitmapInstancePtr instances;
152 } BitmapScalablePrivateRec, *BitmapScalablePrivatePtr;
154 typedef struct _BitmapSources {
155 FontPathElementPtr *fpe;
158 } BitmapSourcesRec, *BitmapSourcesPtr;
160 extern BitmapSourcesRec FontFileBitmapSources;
162 /* Defines for FontFileFindNamesInScalableDir() behavior */
163 #define NORMAL_ALIAS_BEHAVIOR 0
164 #define LIST_ALIASES_AND_TARGET_NAMES (1<<0)
165 #define IGNORE_SCALABLE_ALIASES (1<<1)
167 #endif /* _FONTFILEST_H_ */