1 /*********************************************************************\ 2 * Module Name: 32FDSTRC.H 3 * 4 * OS/2 Intelligent Font Interface 5 * 6 * Copyright (c) 1989,1994 IBM Corporation 7 * Copyright (c) 1989 Microsoft Corporation 8 * 9 \*********************************************************************/ 10 #ifndef __32FDSTRC_H__ 11 #define __32FDSTRC_H__ 12 13 #define FACESIZE 32 14 #define GLYPHNAMESIZE 16 15 16 /* Error codes defined to be returned by IFI */ 17 /* NOTE: The actual values are subject to change */ 18 19 /*#define PMERR_BUFFER_TOO_SMALL 23003L*/ 20 #define PMERR_FACENAME_NOT_FOUND 23004L 21 #define PMERR_FD_ALREADY_INSTALLED 23005L 22 #define PMERR_INVALID_CONTEXTINFO 23006L 23 #define PMERR_NOT_A_FONT_FILE 23007L 24 #define PMERR_INVALID_FONT_SELECTION 23008L 25 #define PMERR_INVALID_FORMAT 23009L 26 #define PMERR_BUSY_HFC 230010L 27 #define PMERR_INVALID_HFC 230011L 28 #define PMERR_INVALID_INDEX 230012L 29 #define PMERR_INVALID_QUERY_TYPE 230013L 30 #define PMERR_CONTEXT_NOT_SET 230014L 31 32 /* Query faces subfunction */ 33 #define FD_QUERY_CONTEXTMETRICS 1L 34 #define FD_QUERY_ABC_WIDTHS 2L 35 #define FD_QUERY_KERNINGPAIRS 3L 36 37 /* Query char subfunction */ 38 #define FD_QUERY_CHARIMAGE 1L 39 #define FD_QUERY_OUTLINE 2L 40 #define FD_QUERY_BITMAPMETRICS 4L 41 42 #define FD_CHARATTR_ALIGNED_8 0x00000001 43 #define FD_CHARATTR_ALIGNED_16 0x00000002 44 #define FD_CHARATTR_ALIGNED_32 0x00000004 45 #define FD_CHARATTR_NO_CACHE 0x00000010 46 47 typedef struct _ABC_TRIPLETS /*abc*/ 48 { 49 LONG lA; 50 ULONG ulB; 51 LONG lC; 52 } ABC_TRIPLETS; 53 typedef ABC_TRIPLETS *PABC_TRIPLETS; 54 55 // THIS STRUCTURE NOW RESIDES IN PMDDI.H FOR CRUISER WORLD 56 // BUT IFI FONT DRIVER DOES NOT INCLUDE PMDDI.H 57 58 #ifndef INCL_IFI 59 typedef struct _POINTFX { /* ptfx */ 60 FIXED x; 61 FIXED y; 62 } POINTFX; 63 typedef POINTFX *PPOINTFX; 64 #endif 65 66 typedef struct _BITMAPMETRICS /* bmm */ 67 { 68 SIZEL sizlExtent; 69 ULONG cyAscent; 70 #ifdef OLD_DRIVER 71 POINTFX *ppfxOrigin; /* Return character origin. */ 72 #else 73 POINTFX pfxOrigin; /* Return character origin. */ 74 #endif 75 } BITMAPMETRICS; 76 typedef BITMAPMETRICS *PBITMAPMETRICS; 77 78 typedef struct _MAT2 /* mat */ 79 { 80 FIXED eM11; 81 FIXED eM12; 82 FIXED eM21; 83 FIXED eM22; 84 } MAT2; 85 86 typedef struct _FD_KERNINGPAIRS /* krnpr */ 87 { 88 GLYPH giFirst; 89 GLYPH giSecond; 90 LONG eKerningAmount; 91 } FD_KERNINGPAIRS; 92 93 typedef struct _CONTEXTINFO /* ci */ 94 { 95 ULONG cb; /* Length in bytes of this structure. */ 96 ULONG fl; /* Flags. */ 97 SIZEL sizlPPM; /* Device resolution in pels/meter. */ 98 POINTFX pfxSpot; /* Spot size in pels. */ 99 MAT2 matXform; /* Notional to Device transform. */ 100 } CONTEXTINFO; 101 typedef CONTEXTINFO *PCONTEXTINFO; 102 103 typedef struct _CHARATTR /* ca */ 104 { 105 ULONG cb; 106 ULONG iQuery; /* Query type. */ 107 GLYPH gi; /* Glyph index in font. */ 108 PBYTE pBuffer; /* Bitmap buffer. */ 109 ULONG cbLen; /* Size of buffer in bytes. */ 110 } CHARATTR; 111 typedef CHARATTR *PCHARATTR; 112 113 typedef struct _CHARATTR2 /* ca2 */ 114 { 115 ULONG cb; 116 ULONG iQuery; /* Query type. */ 117 GLYPH gi; /* Glyph index in font. */ 118 PBYTE pBuffer; /* Bitmap buffer. */ 119 ULONG cbLen; /* Size of buffer in bytes. */ 120 ULONG fl; /* Flags */ 121 } CHARATTR2; 122 typedef CHARATTR2 *PCHARATTR2; 123 124 typedef struct _CONTEXTMETRICS 125 { 126 SIZEL sizlMax; 127 ULONG cyMaxAscent; 128 ULONG cyMaxDescent; 129 ULONG cxTotal; 130 ULONG cGlyphs; 131 } CONTEXTMETRICS; 132 typedef CONTEXTMETRICS * PCONTEXTMETRICS; 133 134 typedef struct _POLYGONHEADER { 135 ULONG cb; 136 ULONG iType; /* Must be FD_POLYGON_TYPE */ 137 } POLYGONHEADER; 138 typedef POLYGONHEADER *PPOLYGONHEADER; 139 140 typedef struct _PRIMLINE { 141 ULONG iType; /* Must be FD_PRIM_LINE */ 142 POINTFX pte; 143 } PRIMLINE; 144 typedef PRIMLINE *PPRIMLINE; 145 146 typedef struct _PRIMSPLINE { 147 ULONG iType; /* Must be FD_PRIM_SPLINE */ 148 POINTFX pte[3]; 149 } PRIMSPLINE; 150 typedef PRIMSPLINE *PPRIMSPLINE; 151 152 /* 153 * The names of these were changed to avoid conflict with PRIM_LINE 154 * which is defined ion some other header file. 155 */ 156 #define FD_POLYGON_TYPE 24 157 #define FD_PRIM_LINE 1 158 #define FD_PRIM_SPLINE 3 159 160 #endif 161 162