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.
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.
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
24 ******************************************************************/
25 /* $NCDId: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */
30 #ifndef BitmapFormatByteOrderMask
35 #ifndef _XTYPEDEF_FONTPTR
36 typedef struct _Font *FontPtr;
37 #define _XTYPEDEF_FONTPTR
40 typedef struct _FontInfo *FontInfoPtr;
41 typedef struct _FontProp *FontPropPtr;
42 typedef struct _ExtentInfo *ExtentInfoPtr;
43 typedef struct _FontPathElement *FontPathElementPtr;
45 #ifndef _XTYPEDEF_CHARINFOPTR
46 typedef struct _CharInfo *CharInfoPtr;
47 #define _XTYPEDEF_CHARINFOPTR
50 typedef struct _FontNames *FontNamesPtr;
51 typedef struct _FontResolution *FontResolutionPtr;
53 #define NullCharInfo ((CharInfoPtr) 0)
54 #define NullFont ((FontPtr) 0)
55 #define NullFontInfo ((FontInfoPtr) 0)
62 typedef int DrawDirection;
64 #define NO_SUCH_CHAR -1
67 #define FontAliasType 0x1000
70 #define StillWorking 81
71 #define FontNameAlias 82
72 #define BadFontName 83
75 #define BadFontPath 86
76 #define BadCharRange 87
77 #define BadFontFormat 88
78 #define FPEResetFailed 89 /* for when an FPE reset won't work */
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
91 #define FinishRamge 0x2
92 #define EightBitFont 0x4
93 #define SixteenBitFont 0x8
95 /* Glyph Caching Modes */
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;
102 extern int StartListFontsWithInfo(
103 #if NeedFunctionPrototypes
104 ClientPtr /*client*/,
106 unsigned char */*pattern*/,
111 extern FontNamesPtr MakeFontNamesRecord(
112 #if NeedFunctionPrototypes
117 extern void FreeFontNames(
118 #if NeedFunctionPrototypes
119 FontNamesPtr /* pFN*/
123 extern int AddFontNamesName(
124 #if NeedFunctionPrototypes
125 FontNamesPtr /* names */,
132 extern int FontToFSError();
133 extern FontResolutionPtr GetClientResolution();
136 typedef struct _FontPatternCache *FontPatternCachePtr;
138 extern FontPatternCachePtr MakeFontPatternCache (
139 #if NeedFunctionPrototypes
144 extern void FreeFontPatternCache (
145 #if NeedFunctionPrototypes
146 FontPatternCachePtr /* cache */
150 extern void EmptyFontPatternCache (
151 #if NeedFunctionPrototypes
152 FontPatternCachePtr /* cache */
156 extern void CacheFontPattern (
157 #if NeedFunctionPrototypes
158 FontPatternCachePtr /* cache */,
159 char * /* pattern */,
164 extern FontResolutionPtr GetClientResolutions(
165 #if NeedFunctionPrototypes
170 extern FontPtr FindCachedFontPattern (
171 #if NeedFunctionPrototypes
172 FontPatternCachePtr /* cache */,
173 char * /* pattern */,
178 extern void RemoveCachedFontPattern (
179 #if NeedFunctionPrototypes
180 FontPatternCachePtr /* cache */,
186 Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit