For PostScript versions < 2.015 we need to explicitly allocate space
[wine] / dlls / wineps / psdrv.h
1 /*
2  *      PostScript driver definitions
3  *
4  *      Copyright 1998  Huw D M Davies
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_PSDRV_H
22 #define __WINE_PSDRV_H
23
24 #include "windef.h"
25 #include "wingdi.h"
26 #include "wine/wingdi16.h"
27 #include "winspool.h"
28
29 typedef struct {
30     INT             index;
31     LPCSTR          sz;
32 } GLYPHNAME;
33
34 typedef struct {
35     LONG            UV;
36     const GLYPHNAME *name;
37 } UNICODEGLYPH;
38
39 typedef struct {
40     float       llx, lly, urx, ury;
41 } AFMBBOX;
42
43 typedef struct _tagAFMLIGS {
44     char                *successor;
45     char                *ligature;
46     struct _tagAFMLIGS  *next;
47 } AFMLIGS;
48
49 typedef struct {
50     int                 C;              /* character */
51     LONG                UV;
52     float               WX;
53     const GLYPHNAME     *N;             /* name */
54     AFMBBOX             B;
55     const AFMLIGS       *L;             /* Ligatures */
56 } OLD_AFMMETRICS;
57
58 typedef struct {
59     INT                 C;                      /* AFM encoding (or -1) */
60     LONG                UV;                     /* Unicode value */
61     FLOAT               WX;                     /* Advance width */
62     const GLYPHNAME     *N;                     /* Glyph name */
63 } AFMMETRICS;
64
65 typedef struct {
66     USHORT              usUnitsPerEm;           /* head:unitsPerEm */
67     SHORT               sAscender;              /* hhea:Ascender */
68     SHORT               sDescender;             /* hhea:Descender */
69     SHORT               sLineGap;               /* hhea:LineGap */
70     SHORT               sAvgCharWidth;          /* OS/2:xAvgCharWidth */
71     SHORT               sTypoAscender;          /* OS/2:sTypoAscender */
72     SHORT               sTypoDescender;         /* OS/2:sTypoDescender */
73     SHORT               sTypoLineGap;           /* OS/2:sTypeLineGap */
74     USHORT              usWinAscent;            /* OS/2:usWinAscent */
75     USHORT              usWinDescent;           /* OS/2:usWinDescent */
76 } WINMETRICS;
77
78 typedef struct _tagAFM {
79     LPCSTR              FontName;
80     LPCSTR              FullName;
81     LPCSTR              FamilyName;
82     LPCSTR              EncodingScheme;
83     LONG                Weight;                 /* FW_NORMAL etc. */
84     float               ItalicAngle;
85     BOOL                IsFixedPitch;
86     float               UnderlinePosition;
87     float               UnderlineThickness;
88     AFMBBOX             FontBBox;
89     float               Ascender;
90     float               Descender;
91     WINMETRICS          WinMetrics;
92     int                 NumofMetrics;
93     const AFMMETRICS    *Metrics;
94 } AFM;
95
96 /* Note no 'next' in AFM. Use AFMLISTENTRY as a container. This allow more than
97    one list to exist without having to reallocate the entire AFM structure. We
98    keep a global list of all afms (PSDRV_AFMFontList) plus a list of available
99    fonts for each DC (dc->physDev->Fonts) */
100
101 typedef struct _tagAFMLISTENTRY {
102     const AFM                   *afm;
103     struct _tagAFMLISTENTRY     *next;
104 } AFMLISTENTRY;
105
106 typedef struct _tagFONTFAMILY {
107     char                        *FamilyName; /* family name */
108     AFMLISTENTRY                *afmlist;    /* list of afms for this family */
109     struct _tagFONTFAMILY       *next;       /* next family */
110 } FONTFAMILY;
111
112 extern FONTFAMILY   *PSDRV_AFMFontList;
113 extern const AFM    *const PSDRV_BuiltinAFMs[];     /* last element is NULL */
114
115 typedef struct _tagFONTNAME {
116     char                *Name;
117     struct _tagFONTNAME *next;
118 } FONTNAME;
119
120 typedef struct {
121     float       llx, lly, urx, ury;
122 } IMAGEABLEAREA;
123
124 typedef struct {
125     float       x, y;
126 } PAPERDIMENSION;
127
128 /* Solaris kludge */
129 #undef PAGESIZE
130 typedef struct _tagPAGESIZE {
131     char                *Name;
132     char                *FullName;
133     char                *InvocationString;
134     IMAGEABLEAREA       *ImageableArea;
135     PAPERDIMENSION      *PaperDimension;
136     WORD                WinPage; /*eg DMPAPER_A4. Doesn't really belong here */
137     struct _tagPAGESIZE *next;
138 } PAGESIZE;
139
140
141 typedef struct _tagOPTIONENTRY {
142     char                        *Name;          /* eg "True" */
143     char                        *FullName;      /* eg "Installed" */
144     char                        *InvocationString; /* Often NULL */
145     struct _tagOPTIONENTRY      *next;
146 } OPTIONENTRY;
147
148 typedef struct _tagOPTION { /* Treat bool as a special case of pickone */
149     char                        *OptionName;    /* eg "*Option1" */
150     char                        *FullName;      /* eg "Envelope Feeder" */
151     char                        *DefaultOption; /* eg "False" */
152     OPTIONENTRY                 *Options;
153     struct _tagOPTION           *next;
154 } OPTION;
155
156 typedef struct _tagCONSTRAINT {
157     char                        *Feature1;
158     char                        *Value1;
159     char                        *Feature2;
160     char                        *Value2;
161     struct _tagCONSTRAINT       *next;
162 } CONSTRAINT;
163
164 typedef struct _tagINPUTSLOT {
165     char                        *Name;
166     char                        *FullName;
167     char                        *InvocationString;
168     WORD                        WinBin; /* eg DMBIN_LOWER */
169     struct _tagINPUTSLOT        *next;
170 } INPUTSLOT;
171
172 typedef enum _RASTERIZEROPTION
173   {RO_None, RO_Accept68K, RO_Type42, RO_TrueImage} RASTERIZEROPTION;
174
175 typedef struct {
176     char                *NickName;
177     int                 LanguageLevel;
178     BOOL                ColorDevice;
179     int                 DefaultResolution;
180     signed int          LandscapeOrientation;
181     char                *JCLBegin;
182     char                *JCLToPSInterpreter;
183     char                *JCLEnd;
184     char                *DefaultFont;
185     FONTNAME            *InstalledFonts; /* ptr to a list of FontNames */
186     PAGESIZE            *PageSizes;
187     PAGESIZE            *DefaultPageSize;
188     OPTION              *InstalledOptions;
189     CONSTRAINT          *Constraints;
190     INPUTSLOT           *InputSlots;
191     RASTERIZEROPTION    TTRasterizer;
192 } PPD;
193
194 typedef struct {
195     DEVMODEA                    dmPublic;
196     struct _tagdocprivate {
197       int dummy;
198     }                           dmDocPrivate;
199     struct _tagdrvprivate {
200       UINT      numInstalledOptions; /* Options at end of struct */
201     }                           dmDrvPrivate;
202
203 /* Now comes:
204
205 numInstalledOptions of OPTIONs
206
207 */
208
209 } PSDRV_DEVMODEA;
210
211 typedef struct _tagPI {
212     char                    *FriendlyName;
213     PPD                     *ppd;
214     PSDRV_DEVMODEA          *Devmode;
215     FONTFAMILY              *Fonts;
216     PPRINTER_ENUM_VALUESA   FontSubTable;
217     DWORD                   FontSubTableSize;
218     struct _tagPI           *next;
219 } PRINTERINFO;
220
221 typedef struct {
222     float               r, g, b;
223 } PSRGB;
224
225 typedef struct {
226     float               i;
227 } PSGRAY;
228
229
230 /* def's for PSCOLOR.type */
231 #define PSCOLOR_GRAY    0
232 #define PSCOLOR_RGB     1
233
234 typedef struct {
235     int                 type;
236     union {
237         PSRGB  rgb;
238         PSGRAY gray;
239     }                   value;
240 } PSCOLOR;
241
242 typedef struct {
243     const AFM           *afm;
244     float               scale;
245     TEXTMETRICW         tm;
246 } BUILTIN;
247
248 typedef struct tagTYPE42 TYPE42;
249
250 typedef struct tagTYPE1 TYPE1;
251
252 enum downloadtype {
253   Type1, Type42
254 };
255
256 typedef struct _tagDOWNLOAD {
257   enum downloadtype type;
258   union {
259     TYPE1  *Type1;
260     TYPE42 *Type42;
261   } typeinfo;
262   char *ps_name;
263   struct _tagDOWNLOAD *next;
264 } DOWNLOAD;
265
266 enum fontloc {
267   Builtin, Download
268 };
269
270 typedef struct {
271     enum fontloc        fontloc;
272     union {
273         BUILTIN  Builtin;
274         DOWNLOAD *Download;
275     }                   fontinfo;
276
277     int                 size;
278     PSCOLOR             color;
279     BOOL                set;            /* Have we done a setfont yet */
280
281   /* These are needed by PSDRV_ExtTextOut */
282     int                 escapement;
283     int                 underlineThickness;
284     int                 underlinePosition;
285     int                 strikeoutThickness;
286     int                 strikeoutPosition;
287
288 } PSFONT;
289
290 typedef struct {
291     PSCOLOR             color;
292     BOOL                set;
293 } PSBRUSH;
294
295 typedef struct {
296     INT                 style;
297     INT         width;
298     char                *dash;
299     PSCOLOR             color;
300     BOOL                set;
301 } PSPEN;
302
303 typedef struct {
304     HANDLE16            hJob;
305     LPSTR               output;         /* Output file/port */
306     BOOL                banding;        /* Have we received a NEXTBAND */
307     BOOL                OutOfPage;      /* Page header not sent yet */
308     INT                 PageNo;
309     BOOL                quiet;          /* Don't actually output anything */
310 } JOB;
311
312 typedef struct {
313     HDC                 hdc;
314     struct tagDC       *dc;
315     PSFONT              font;           /* Current PS font */
316     DOWNLOAD            *downloaded_fonts;
317     PSPEN               pen;
318     PSBRUSH             brush;
319     PSCOLOR             bkColor;
320     PSCOLOR             inkColor;       /* Last colour set */
321     JOB                 job;
322     PSDRV_DEVMODEA      *Devmode;
323     PRINTERINFO         *pi;
324     SIZE                PageSize;      /* Physical page size in device units */
325     RECT                ImageableArea; /* Imageable area in device units */
326                                        /* NB both PageSize and ImageableArea
327                                           are not rotated in landscape mode,
328                                           so PageSize.cx is generally
329                                           < PageSize.cy */
330     int                 horzRes;       /* device caps */
331     int                 vertRes;
332     int                 horzSize;
333     int                 vertSize;
334     int                 logPixelsX;
335     int                 logPixelsY;
336
337     int                 pathdepth;
338 } PSDRV_PDEVICE;
339
340 typedef struct {
341     PRINTERINFO *pi;
342     PSDRV_DEVMODEA *dlgdm;
343 } PSDRV_DLGINFO;
344
345
346 /*
347  *  Every glyph name in the Adobe Glyph List and the 35 core PostScript fonts
348  */
349
350 extern const INT    PSDRV_AGLGlyphNamesSize;
351 extern GLYPHNAME    PSDRV_AGLGlyphNames[];
352
353
354 /*
355  *  The AGL encoding vector
356  */
357
358 extern const INT            PSDRV_AGLbyNameSize;    /* sorted by name -     */
359 extern const UNICODEGLYPH   PSDRV_AGLbyName[];      /*  duplicates omitted  */
360
361 extern const INT            PSDRV_AGLbyUVSize;      /* sorted by UV -       */
362 extern const UNICODEGLYPH   PSDRV_AGLbyUV[];        /*  duplicates included */
363
364
365 extern INT16 WINAPI PSDRV_ExtDeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
366                     LPDEVMODEA lpdmOutput, LPSTR lpszDevice, LPSTR lpszPort,
367                     LPDEVMODEA lpdmInput, LPSTR lpszProfile, WORD fwMode);
368
369 extern HANDLE PSDRV_Heap;
370 extern char *PSDRV_ANSIVector[256];
371
372 extern void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
373                          PRINTERINFO *pi);
374 extern BOOL PSDRV_GetFontMetrics(void);
375 extern PPD *PSDRV_ParsePPD(char *fname);
376 extern PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name);
377 extern const AFM *PSDRV_FindAFMinList(FONTFAMILY *head, LPCSTR name);
378 extern BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm,
379         BOOL *p_added);
380 extern void PSDRV_FreeAFMList( FONTFAMILY *head );
381
382 extern BOOL WINAPI PSDRV_Init(HINSTANCE hinst, DWORD reason, LPVOID reserved);
383
384 extern BOOL PSDRV_Brush(PSDRV_PDEVICE *physDev, BOOL EO);
385 extern BOOL PSDRV_SetFont( PSDRV_PDEVICE *physDev );
386 extern BOOL PSDRV_SetPen( PSDRV_PDEVICE *physDev );
387
388 extern void PSDRV_SetClip(PSDRV_PDEVICE* phyDev);
389 extern void PSDRV_ResetClip(PSDRV_PDEVICE* phyDev);
390
391 extern BOOL PSDRV_CmpColor(PSCOLOR *col1, PSCOLOR *col2);
392 extern BOOL PSDRV_CopyColor(PSCOLOR *col1, PSCOLOR *col2);
393 extern void PSDRV_CreateColor( PSDRV_PDEVICE *physDev, PSCOLOR *pscolor,
394                      COLORREF wincolor );
395 extern char PSDRV_UnicodeToANSI(int u);
396
397 extern INT PSDRV_WriteHeader( PSDRV_PDEVICE *physDev, LPCSTR title );
398 extern INT PSDRV_WriteFooter( PSDRV_PDEVICE *physDev );
399 extern INT PSDRV_WriteNewPage( PSDRV_PDEVICE *physDev );
400 extern INT PSDRV_WriteEndPage( PSDRV_PDEVICE *physDev );
401 extern BOOL PSDRV_WriteMoveTo(PSDRV_PDEVICE *physDev, INT x, INT y);
402 extern BOOL PSDRV_WriteLineTo(PSDRV_PDEVICE *physDev, INT x, INT y);
403 extern BOOL PSDRV_WriteStroke(PSDRV_PDEVICE *physDev);
404 extern BOOL PSDRV_WriteRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width,
405                         INT height);
406 extern BOOL PSDRV_WriteRRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width,
407                         INT height);
408 extern BOOL PSDRV_WriteSetFont(PSDRV_PDEVICE *physDev, const char *name, INT size,
409                                INT escapement);
410 extern BOOL PSDRV_WriteGlyphShow(PSDRV_PDEVICE *physDev, LPCSTR g_name);
411 extern BOOL PSDRV_WriteSetPen(PSDRV_PDEVICE *physDev);
412 extern BOOL PSDRV_WriteArc(PSDRV_PDEVICE *physDev, INT x, INT y, INT w, INT h,
413                              double ang1, double ang2);
414 extern BOOL PSDRV_WriteSetColor(PSDRV_PDEVICE *physDev, PSCOLOR *color);
415 extern BOOL PSDRV_WriteSetBrush(PSDRV_PDEVICE *physDev);
416 extern BOOL PSDRV_WriteFill(PSDRV_PDEVICE *physDev);
417 extern BOOL PSDRV_WriteEOFill(PSDRV_PDEVICE *physDev);
418 extern BOOL PSDRV_WriteGSave(PSDRV_PDEVICE *physDev);
419 extern BOOL PSDRV_WriteGRestore(PSDRV_PDEVICE *physDev);
420 extern BOOL PSDRV_WriteNewPath(PSDRV_PDEVICE *physDev);
421 extern BOOL PSDRV_WriteClosePath(PSDRV_PDEVICE *physDev);
422 extern BOOL PSDRV_WriteInitClip(PSDRV_PDEVICE *physDev);
423 extern BOOL PSDRV_WriteClip(PSDRV_PDEVICE *physDev);
424 extern BOOL PSDRV_WriteRectClip(PSDRV_PDEVICE *physDev, INT x, INT y, INT w, INT h);
425 extern BOOL PSDRV_WriteRectClip2(PSDRV_PDEVICE *physDev, CHAR *pszArrayName);
426 extern BOOL PSDRV_WriteEOClip(PSDRV_PDEVICE *physDev);
427 extern BOOL PSDRV_WriteHatch(PSDRV_PDEVICE *physDev);
428 extern BOOL PSDRV_WriteRotate(PSDRV_PDEVICE *physDev, float ang);
429 extern BOOL PSDRV_WriteIndexColorSpaceBegin(PSDRV_PDEVICE *physDev, int size);
430 extern BOOL PSDRV_WriteIndexColorSpaceEnd(PSDRV_PDEVICE *physDev);
431 extern BOOL PSDRV_WriteRGB(PSDRV_PDEVICE *physDev, COLORREF *map, int number);
432 extern BOOL PSDRV_WriteImageDict(PSDRV_PDEVICE *physDev, WORD depth, INT xDst, INT yDst,
433                                  INT widthDst, INT heightDst, INT widthSrc,
434                                  INT heightSrc, char *bits, BOOL mask);
435 extern BOOL PSDRV_WriteBytes(PSDRV_PDEVICE *physDev, const BYTE *bytes, int number);
436 extern BOOL PSDRV_WriteDIBits16(PSDRV_PDEVICE *physDev, const WORD *words, int number);
437 extern BOOL PSDRV_WriteDIBits24(PSDRV_PDEVICE *physDev, const BYTE *bits, int number);
438 extern BOOL PSDRV_WriteDIBits32(PSDRV_PDEVICE *physDev, const BYTE *bits, int number);
439 extern int PSDRV_WriteSpool(PSDRV_PDEVICE *physDev, LPSTR lpData, WORD cch);
440 extern BOOL PSDRV_WritePatternDict(PSDRV_PDEVICE *physDev, BITMAP *bm, BYTE *bits);
441 extern BOOL PSDRV_WriteDIBPatternDict(PSDRV_PDEVICE *physDev, BITMAPINFO *bmi, UINT usage);
442 extern BOOL PSDRV_WriteArrayPut(PSDRV_PDEVICE *physDev, CHAR *pszArrayName, INT nIndex, LONG lCoord);
443 extern BOOL PSDRV_WriteArrayDef(PSDRV_PDEVICE *physDev, CHAR *pszArrayName, INT nSize);
444
445 extern BOOL PSDRV_Arc( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
446                          INT bottom, INT xstart, INT ystart,
447                          INT xend, INT yend );
448 extern BOOL PSDRV_Chord( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
449                            INT bottom, INT xstart, INT ystart,
450                            INT xend, INT yend );
451 extern BOOL PSDRV_Ellipse( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
452                              INT bottom );
453 extern INT PSDRV_EndDoc( PSDRV_PDEVICE *physDev );
454 extern INT PSDRV_EndPage( PSDRV_PDEVICE *physDev );
455 extern BOOL PSDRV_ExtTextOut( PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
456                                 const RECT *lprect, LPCWSTR str, UINT count,
457                                 const INT *lpDx );
458 extern BOOL PSDRV_GetCharWidth( PSDRV_PDEVICE *physDev, UINT firstChar, UINT lastChar,
459                                   LPINT buffer );
460 extern BOOL PSDRV_GetTextExtentPoint( PSDRV_PDEVICE *physDev, LPCWSTR str, INT count,
461                                         LPSIZE size );
462 extern BOOL PSDRV_GetTextMetrics( PSDRV_PDEVICE *physDev, TEXTMETRICW *metrics );
463 extern BOOL PSDRV_LineTo( PSDRV_PDEVICE *physDev, INT x, INT y );
464 extern BOOL PSDRV_PatBlt( PSDRV_PDEVICE *physDev, INT x, INT y, INT width, INT height, DWORD
465                           dwRop);
466 extern BOOL PSDRV_Pie( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
467                          INT bottom, INT xstart, INT ystart,
468                          INT xend, INT yend );
469 extern BOOL PSDRV_Polygon( PSDRV_PDEVICE *physDev, const POINT* pt, INT count );
470 extern BOOL PSDRV_Polyline( PSDRV_PDEVICE *physDev, const POINT* pt, INT count );
471 extern BOOL PSDRV_PolyPolygon( PSDRV_PDEVICE *physDev, const POINT* pts, const INT* counts,
472                                  UINT polygons );
473 extern BOOL PSDRV_PolyPolyline( PSDRV_PDEVICE *physDev, const POINT* pts, const DWORD* counts,
474                                   DWORD polylines );
475 extern BOOL PSDRV_Rectangle( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
476                               INT bottom );
477 extern BOOL PSDRV_RoundRect(PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
478                               INT bottom, INT ell_width, INT ell_height);
479 extern COLORREF PSDRV_SetBkColor( PSDRV_PDEVICE *physDev, COLORREF color );
480 extern COLORREF PSDRV_SetPixel( PSDRV_PDEVICE *physDev, INT x, INT y, COLORREF color );
481 extern COLORREF PSDRV_SetTextColor( PSDRV_PDEVICE *physDev, COLORREF color );
482 extern INT PSDRV_StartDoc( PSDRV_PDEVICE *physDev, const DOCINFOA *doc );
483 extern INT PSDRV_StartPage( PSDRV_PDEVICE *physDev );
484 extern INT PSDRV_StretchDIBits( PSDRV_PDEVICE *physDev, INT xDst, INT yDst,
485                                 INT widthDst, INT heightDst, INT xSrc,
486                                 INT ySrc, INT widthSrc, INT heightSrc,
487                                 const void *bits, const BITMAPINFO *info,
488                                 UINT wUsage, DWORD dwRop );
489
490 extern INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd,
491                                LPDEVMODEA lpdmOutput,
492                                LPSTR lpszDevice, LPSTR lpszPort,
493                                LPDEVMODEA lpdmInput, LPSTR lpszProfile,
494                                DWORD dwMode);
495 extern DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice,
496                                       LPCSTR lpszPort,
497                                       WORD fwCapability, LPSTR lpszOutput,
498                                       LPDEVMODEA lpdm);
499 INT PSDRV_GlyphListInit(void);
500 const GLYPHNAME *PSDRV_GlyphName(LPCSTR szName);
501 VOID PSDRV_IndexGlyphList(void);
502 BOOL PSDRV_GetTrueTypeMetrics(void);
503 BOOL PSDRV_GetType1Metrics(void);
504 const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm);
505 SHORT PSDRV_CalcAvgCharWidth(const AFM *afm);
506
507 extern BOOL PSDRV_SelectBuiltinFont(PSDRV_PDEVICE *physDev, HFONT hfont,
508                                     LOGFONTW *plf, LPSTR FaceName);
509 extern BOOL PSDRV_WriteSetBuiltinFont(PSDRV_PDEVICE *physDev);
510 extern BOOL PSDRV_WriteBuiltinGlyphShow(PSDRV_PDEVICE *physDev, LPCWSTR str, INT count);
511
512 extern BOOL PSDRV_SelectDownloadFont(PSDRV_PDEVICE *physDev);
513 extern BOOL PSDRV_WriteSetDownloadFont(PSDRV_PDEVICE *physDev);
514 extern BOOL PSDRV_WriteDownloadGlyphShow(PSDRV_PDEVICE *physDev, WORD *glpyhs,
515                                          UINT count);
516 extern BOOL PSDRV_EmptyDownloadList(PSDRV_PDEVICE *physDev, BOOL write_undef);
517
518 #define MAX_G_NAME 31 /* max length of PS glyph name */
519 extern void get_glyph_name(HDC hdc, WORD index, char *name);
520
521 extern TYPE1 *T1_download_header(PSDRV_PDEVICE *physDev,
522                                  LPOUTLINETEXTMETRICA potm,
523                                  char *ps_name);
524 extern BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl,
525                               DWORD index, char *glyph_name);
526 extern void T1_free(TYPE1 *t1);
527
528 extern TYPE42 *T42_download_header(PSDRV_PDEVICE *physDev,
529                                    LPOUTLINETEXTMETRICA ptom,
530                                    char *ps_name);
531 extern BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl,
532                                DWORD index, char *glyph_name);
533 extern void T42_free(TYPE42 *t42);
534 #endif