1 /***********************************************************
2 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
6 Permission to use, copy, modify, and distribute this software and its
7 documentation for any purpose and without fee is hereby granted,
8 provided that the above copyright notice appear in all copies and that
9 both that copyright notice and this permission notice appear in
10 supporting documentation, and that the name of Digital not be
11 used in advertising or publicity pertaining to distribution of the
12 software without specific, written prior permission.
14 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22 ******************************************************************/
27 #ifndef BitmapFormatByteOrderMask
32 #ifndef _XTYPEDEF_FONTPTR
33 typedef struct _Font *FontPtr;
34 #define _XTYPEDEF_FONTPTR
37 typedef struct _FontInfo *FontInfoPtr;
38 typedef struct _FontProp *FontPropPtr;
39 typedef struct _ExtentInfo *ExtentInfoPtr;
40 typedef struct _FontPathElement *FontPathElementPtr;
42 #ifndef _XTYPEDEF_CHARINFOPTR
43 typedef struct _CharInfo *CharInfoPtr;
44 #define _XTYPEDEF_CHARINFOPTR
47 typedef struct _FontNames *FontNamesPtr;
48 typedef struct _FontResolution *FontResolutionPtr;
50 #define NullCharInfo ((CharInfoPtr) 0)
51 #define NullFont ((FontPtr) 0)
52 #define NullFontInfo ((FontInfoPtr) 0)
59 typedef int DrawDirection;
61 #define NO_SUCH_CHAR -1
64 #define FontAliasType 0x1000
67 #define StillWorking 81
68 #define FontNameAlias 82
69 #define BadFontName 83
72 #define BadFontPath 86
73 #define BadCharRange 87
74 #define BadFontFormat 88
75 #define FPEResetFailed 89 /* for when an FPE reset won't work */
78 #define FontLoadInfo 0x0001
79 #define FontLoadProps 0x0002
80 #define FontLoadMetrics 0x0004
81 #define FontLoadBitmaps 0x0008
82 #define FontLoadAll 0x000f
83 #define FontOpenSync 0x0010
84 #define FontReopen 0x0020
88 #define FinishRamge 0x2
89 #define EightBitFont 0x4
90 #define SixteenBitFont 0x8
92 /* Glyph Caching Modes */
94 #define CACHE_16_BIT_GLYPHS 1
95 #define CACHE_ALL_GLYPHS 2
96 #define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS
97 extern int glyphCachingMode;
101 extern int StartListFontsWithInfo(
102 struct _Client * /*client*/,
104 unsigned char * /*pattern*/,
108 extern FontNamesPtr MakeFontNamesRecord(
112 extern void FreeFontNames(
113 FontNamesPtr /* pFN*/
116 extern int AddFontNamesName(
117 FontNamesPtr /* names */,
123 extern int FontToFSError();
124 extern FontResolutionPtr GetClientResolution();
127 typedef struct _FontPatternCache *FontPatternCachePtr;
129 extern FontPatternCachePtr MakeFontPatternCache (
133 extern void FreeFontPatternCache (
134 FontPatternCachePtr /* cache */
137 extern void EmptyFontPatternCache (
138 FontPatternCachePtr /* cache */
141 extern void CacheFontPattern (
142 FontPatternCachePtr /* cache */,
143 const char * /* pattern */,
147 extern FontResolutionPtr GetClientResolutions(
151 extern FontPtr FindCachedFontPattern (
152 FontPatternCachePtr /* cache */,
153 const char * /* pattern */,
157 extern void RemoveCachedFontPattern (
158 FontPatternCachePtr /* cache */,
163 Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit