home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / fontedit / fontedit.h < prev    next >
C/C++ Source or Header  |  1996-01-07  |  22KB  |  527 lines

  1. #include <stdlib.h>
  2.  
  3. #define   WIDER_LEFT 1
  4. #define   WIDER_RIGHT 2
  5. #define   WIDER_BOTH 3
  6. #define   NARROWER_LEFT 4
  7. #define   NARROWER_RIGHT 5
  8. #define   NARROWER_BOTH 6
  9. #define   WIDTH 7
  10. #define   BOX_WIDTH 8
  11.  
  12. #define   BOX_REFRESH 10                /* Restore char to original form */
  13. #define   BOX_CLEAR 11
  14. #define   BOX_FILL 12
  15. #define   BOX_INV 13
  16. #define   BOX_HATCH 14
  17. #define   BOX_UNDO 15                   /* Undo last change */
  18. #define   BOX_LEFTRIGHT 16              /* Flip left to right */
  19. #define   BOX_TOPBOTTOM 17              /* Flip top over bottom */
  20. #define   BOX_COPY 18
  21. #define   BOX_PASTE 19
  22.  
  23. #define   ROW_ADD 21
  24. #define   ROW_DEL 22
  25.  
  26. #define   COL_ADD 31
  27. #define   COL_DEL 32
  28.  
  29.  
  30. #define   ID_EDIT 34
  31. #define   ID_PATH 35
  32. #define   ID_LISTBOX 36
  33. #define   ID_FACE_NAME 37
  34. #define   ID_FONT_NAME 38
  35. #define   ID_COPYRIGHT 39
  36.  
  37. #define   FONT_START 40                 /* Generated if win fontedit arg. */
  38.  
  39. #define   FONT_LOAD 41                  /* Codes for Font Window */
  40. #define   FONT_SAVE 42
  41. #define   FONT_HEADER 43
  42. #define   FONT_COPY 44
  43. #define   FONT_PASTE 45                 /* Paste in without rescaling */
  44. #define   FONT_ABOUT 46                 /* Display the about box */
  45. #define   FONT_RESIZE 47                /* Go to Resize Dialog Box */
  46. #define   FONT_NEW 95                   /* Menu id: create new font */
  47.  
  48.  
  49. #define   ID_FIRST_CHAR 48              /* First character in the font */
  50. #define   ID_LAST_CHAR 49               /* Last character in the font */
  51.  
  52. #define   ID_POINTS 50                  /* Nominal Point Size */
  53. #define   ID_VERT_RES 51                /* Nominal Vertical Resolution */
  54. #define   ID_HORIZ_RES 52               /* Nominal Horizontal Resolution */
  55. #define   ID_ASCENT 53                  /* Height of Ascent */
  56. #define   ID_EXT_LEADING 54             /* Height of External Leading */
  57. #define   ID_INT_LEADING 55             /* Height of Internal Leading */
  58.  
  59. #define   FONT_EXIT 56                  /* exit the font editor */
  60.  
  61. #define   ID_ITALIC 60                  /* Flag for Italic Fonts */
  62. #define   ID_UNDERLINE 61               /* Flag for Underlined Fonts */
  63. #define   ID_STRIKEOUT 62               /* Flag for Struckout Fonts */
  64. #define   ID_ANSI 63                    /* 0 = ANSI, 255 = other */
  65. #define   ID_OEM 64
  66. #define   ID_CHAR_SET 65
  67. #define   ID_DEFAULT_CHAR 66            /* Default for undefined Chars. */
  68. #define   ID_BREAK_CHAR 67
  69. #define   ID_SYMBOL 68
  70.  
  71. #define   ID_UNKNOWN 70
  72. #define   ID_ROMAN 71
  73. #define   ID_SWISS 72                   /* Pitch Families */
  74. #define   ID_MODERN 73
  75. #define   ID_SCRIPT 74
  76. #define   ID_DECORATIVE 75
  77.  
  78. #define   ID_PIX_HEIGHT 80              /* Height of Characters */
  79. #define   ID_WIDTH 81                   /* Fixed or Maximum Width */
  80. #define   ID_WIDTH_TEXT 82              /* Caption for above */
  81. #define   ID_AVERAGE 83                 /* Average Character Width */
  82. #define   ID_FIXED 84                   /* Fixed Width Font */
  83. #define   ID_VARIABLE 85                /* Variable width font */
  84.  
  85. #define   ID_THIN 86
  86. #define   ID_EXTRALIGHT 87
  87. #define   ID_LIGHT 88
  88. #define   ID_NORMAL 89
  89. #define   ID_MEDIUM 90
  90. #define   ID_SEMIBOLD 91
  91. #define   ID_BOLD 92
  92. #define   ID_EXTRABOLD 93
  93. #define   ID_HEAVY 94
  94. #define   ID_BOXOPEN 96                /* dialog box frame id for File Open */
  95. #define   FONT_SAVEAS 97
  96.  
  97. #define   ID_FORMAT2 102                /* Windows 2.0 Font Format */
  98. #define   ID_FORMAT3 103                /* Windows 3.0 Font Format */
  99.  
  100. /* string IDS for strings in resource file - LR */
  101. #define IDS_NOMPTSIZENOTOK          0
  102. #define IDS_NOMVERTRESNOTOK         1
  103. #define IDS_NOMHORRESNOTOK          2
  104. #define IDS_ASCENTTOOBIG            3
  105. #define IDS_ASCENTNOTOK             4
  106. #define IDS_EXTLEADNOTOK            5
  107. #define IDS_INTLEADTOOBIG           6
  108. #define IDS_INTLEADNOTOK            7
  109. #define IDS_CHARSETOUTOFBOUNDS      8
  110. #define IDS_DEFCHAROUTSIDEFONT      9
  111. #define IDS_DEFCHARNOTOK           10
  112. #define IDS_BREAKCHAROUTSIDEFONT   11
  113. #define IDS_BREAKCHARNOTOK         12
  114. #define IDS_UNKNOWNFACE            13
  115. #define IDS_NOVARTOFIXCHANGE       14
  116. #define IDS_TOOBIGFOR20            15
  117. #define IDS_HEIGHTOUTOFBOUNDS      16
  118. #define IDS_WIDTHOUTOFBOUNDS       17
  119. #define IDS_CHAR1MORETHANDCHAR     18
  120. #define IDS_CHAR1NOTOK             19
  121. #define IDS_LASTCHARTOOSMALL       20
  122. #define IDS_LASTCHARNOTOK          21
  123. #define IDS_CANNOTOPENCLIP         22
  124. #define IDS_COPYINGTOCLIP          23
  125. #define IDS_NOTENOUGHMEM           24
  126. #define IDS_ALLOCATINGSPACE        25
  127. #define IDS_FONTEDIT               26
  128. #define IDS_FONTSHOW               27
  129. #define IDS_DOTFNT                 28
  130. #define IDS_BLANKDASHBLANK         29
  131. #define IDS_ERROROPENINGFILE       30
  132. #define IDS_ERRORREADINGHDR        31
  133. #define IDS_UNKNOWNFORMAT          32
  134. #define IDS_ERRORREADINGBODY       33
  135. #define IDS_FILETOOLARGE           34
  136. #define IDS_ERRORWRITINGHDR        35
  137. #define IDS_ERRORWRITINGOFFSETS    36
  138. #define IDS_ERRORWRITINGBODY       37
  139. #define IDS_STARDOTFNT             38
  140. #define IDS_UNKNOWN                39
  141. #define IDS_MAXWIDTH               40
  142. #define IDS_CHARPIXELWIDTH         41
  143. #define IDS_ABOUT                  42
  144. #define IDS_DHEADER                43
  145. #define IDS_DRESIZE                44
  146. #define IDS_DWIDTH                 45
  147. #define IDS_EDLIMITS0TO64          46
  148. #define IDS_MAXWIDTHINCREASE       47
  149. #define IDS_CANNOTCHANGEWIDTH      48
  150. #define IDS_WARNING                49
  151. #define IDS_INCORRECTPIXWIDTH      50
  152. #define IDS_MAXWIDTHOUTOFBOUNDS    51
  153. #define IDS_AVGWIDTHOUTOFBOUNDS    52
  154. #define IDS_WIDTHBYTESNOTOK        53
  155. #define IDS_BITSOFFSETNOTOK        54
  156. #define IDS_TABLEWIDTHSBAD         55
  157. #define IDS_TABLEOFFSETSBAD        56
  158. #define IDS_COLOR                  57
  159. #define IDS_APPWORKSPACE           58
  160. #define IDS_FILEREADONLY           59
  161.  
  162. #define     IDS_APPNAME            60
  163. #define     IDS_IFN                61
  164. #define     IDS_FNF                62
  165. #define     IDS_REF                63
  166. #define     IDS_SCC                64
  167. #define     IDS_EOF                65
  168. #define     IDS_ECF                66
  169. #define     IDS_FRO                67
  170. #define     IDS_EXT                68
  171. #define     IDS_EXTDESC            69
  172. #define     IDS_NEW_FONT           70
  173. #define     IDS_ERRORCLIP          71
  174. #define     IDS_CHAR        72
  175. #define     IDS_WIDTH        73
  176. #define     IDS_HEIGHT        74
  177.  
  178.  
  179. #define CSTRINGS                   75   /* total number of strings in
  180.                                            resource file */
  181. #define CCHSTRINGSMAX              4096 /* total length of all strings
  182.                                            loaded must be <= this */
  183. #define CCHCOLORSTRING             15   /* size of App Workspace color inf.
  184.                                            string loaded from win.ini */
  185. #define ID_SHIFTJIS                76
  186.  
  187. /*****************************************************************************/
  188. /*              Typedef's etc.                                               */
  189. /*****************************************************************************/
  190.  
  191. // typedef unsigned char CHAR;  /* ... since we use these to index */
  192.  
  193. /* font file header (Adaptation Guide section 6.4) */
  194. typedef struct {
  195.     WORD        Version;              /* Always 17985 for the Nonce */
  196.     DWORD       Size;                 /* Size of whole file */
  197.     CHAR        Copyright[60];
  198.     WORD        Type;                 /* Raster Font if Type & 1 == 0 */
  199.     WORD        Points;               /* Nominal Point size */
  200.     WORD        VertRes;              /* Nominal Vertical resolution */
  201.     WORD        HorizRes;             /* Nominal Horizontal resolution */
  202.     WORD        Ascent;               /* Height of Ascent */
  203.     WORD        IntLeading;           /* Internal (Microsoft) Leading */
  204.     WORD        ExtLeading;           /* External (Microsoft) Leading */
  205.     BYTE        Italic;               /* Italic font if set */
  206.     BYTE        Underline;            /* Etc. */
  207.     BYTE        StrikeOut;            /* Etc. */
  208.     WORD        Weight;               /* Weight: 200 = regular */
  209.     BYTE        CharSet;              /* ANSI=0. other=255 */
  210.     WORD        PixWidth;             /* Fixed width. 0 ==> Variable */
  211.     WORD        PixHeight;            /* Fixed Height */
  212.     BYTE        Family;               /* Pitch and Family */
  213.     WORD        AvgWidth;             /* Width of character 'X' */
  214.     WORD        MaxWidth;             /* Maximum width */
  215.     BYTE        FirstChar;            /* First character defined in font */
  216.     BYTE        LastChar;             /* Last character defined in font */
  217.     BYTE        DefaultChar;          /* Sub. for out of range chars. */
  218.     BYTE        BreakChar;            /* Word Break Character */
  219.     WORD        WidthBytes;           /* No.Bytes/row of Bitmap */
  220.     DWORD       Device;               /* Pointer to Device Name string */
  221.     DWORD       Face;                   /* Pointer to Face Name String */
  222.     DWORD       BitsPointer;            /* Pointer to Bit Map */
  223.     DWORD       BitsOffset;             /* Offset to Bit Map */
  224. } FontHeaderType;           /* Above pointers all rel. to start of file */
  225.  
  226.  
  227. typedef struct {
  228.     WORD        fsVersion;
  229.     DWORD       fsSize;
  230.     CHAR        fsCopyright[60];
  231.     WORD        fsType;               /* Type field for the font              */
  232.     WORD        fsPoints;             /* Point size of font                   */
  233.     WORD        fsVertRes;            /* Vertical digitization                */
  234.     WORD        fsHorizRes;           /* Horizontal digitization              */
  235.     WORD        fsAscent;             /* Baseline offset from char cell top   */
  236.     WORD        fsInternalLeading;    /* Internal leading included in font    */
  237.     WORD        fsExternalLeading;    /* Prefered extra space between lines   */
  238.     BYTE        fsItalic;             /* Flag specifying if italic            */
  239.     BYTE        fsUnderline;          /* Flag specifying if underlined        */
  240.     BYTE        fsStrikeOut;          /* Flag specifying if struck out        */
  241.     WORD        fsWeight;             /* Weight of font                       */
  242.     BYTE        fsCharSet;            /* Character set of font                */
  243.     WORD        fsPixWidth;           /* Width field for the font             */
  244.     WORD        fsPixHeight;          /* Height field for the font            */
  245.     BYTE        fsPitchAndFamily;     /* Flag specifying pitch and family     */
  246.     WORD        fsAvgWidth;           /* Average character width              */
  247.     WORD        fsMaxWidth;           /* Maximum character width              */
  248.     BYTE        fsFirstChar;          /* First character in the font          */
  249.     BYTE        fsLastChar;           /* Last character in the font           */
  250.     BYTE        fsDefaultChar;        /* Default character for out of range   */
  251.     BYTE        fsBreakChar;          /* Character to define wordbreaks       */
  252.     WORD        fsWidthBytes;         /* Number of bytes in each row          */
  253.     DWORD       fsDevice;             /* Offset to device name                */
  254.     DWORD       fsFace;               /* Offset to face name                  */
  255.     DWORD       fsBitsPointer;        /* Bits pointer                         */
  256.     DWORD       fsBitsOffset;         /* Offset to the begining of the bitmap */
  257.     BYTE        fsDBfiller;              /* Word alignment for the offset table  */
  258.  
  259.     DWORD       fsFlags;              /* Bit flags                            */
  260.     WORD        fsAspace;             /* Global A space, if any               */
  261.     WORD        fsBspace;             /* Global B space, if any               */
  262.     WORD        fsCspace;             /* Global C space, if any               */
  263.     DWORD       fsColorPointer;       /* offset to color table, if any        */
  264.     DWORD       fsReserved[4];        /*                                      */
  265.     BYTE        fsCharOffset;         /* Area for storing the char. offsets   */
  266.  
  267. } FontHeader30;
  268.  
  269. #define   CCHEXTRA             31     /* no. of extra bytes in the 3.0 header */
  270.  
  271. //
  272. // These are the old glyph info structures.  Since they are not DWORD aligned
  273. // they must be converted to new structure types.
  274. //
  275.  
  276. typedef struct{
  277.      SHORT GIwidth;
  278.      SHORT GIoffset;
  279. } GLYPHINFO_20;
  280.  
  281. typedef struct{
  282.      SHORT GIwidth;
  283.      LONG GIoffset;
  284. } GLYPHINFO_30;
  285.  
  286. #define ClipBoard TRUE
  287.  
  288. LONG  APIENTRY FontEditWndProc(HWND, WORD, WPARAM, LONG);
  289. LONG  APIENTRY FontShowWndProc(HWND, WORD, WPARAM, LONG);
  290. BOOL  APIENTRY
  291. HeaderProc(
  292.     HWND   hDial,
  293.     WORD   message,
  294.     WPARAM wParam,
  295.     LPARAM lParam
  296.     );
  297. BOOL APIENTRY
  298. ReSizeProc(
  299.     HWND   hDial,
  300.     WORD   message,
  301.     WPARAM wParam,
  302.     LPARAM lParam
  303.     );
  304. BOOL  APIENTRY
  305. WidthProc(
  306.     HWND   hDial,
  307.     WORD   message,
  308.     WPARAM wParam,
  309.     LPARAM lParam
  310.     );
  311.  
  312. CHAR * FontLoad(CHAR *, OFSTRUCT *);
  313. CHAR * FontSave(CHAR *, OFSTRUCT *);
  314. BOOL ResizeBody();              /* Change Height of Font. MAde return type BOOL istead of VOID - LR */
  315. BOOL ResizeWidths();            /* Change Widths (Fixed Width Fonts).MAde return type BOOL istead of VOID - LR  */
  316. BOOL SpreadWidths(DWORD);            /* Change Widths (Var. Width Fonts). MAde return type BOOL istead of VOID - LR  */
  317. VOID DeleteGlobalBitmap();
  318. VOID ScrollFont();
  319. VOID ExciseChars();             /* Delete part of a font */
  320. BOOL
  321. CharWidth(
  322.     BYTE iChar,                             /* Character to change */
  323.     DWORD wBox                               /* New width */
  324.     );
  325. BOOL NewLastChar(DWORD);             /* MAde return type BOOL istead of VOID - LR */
  326. BOOL NewFirstChar(DWORD);            /* MAde return type BOOL istead of VOID - LR */
  327. #define kBoxLim 65  /* was 49 */
  328.  
  329. #define wBoxLim 65
  330. #define szNamesMax 32
  331. #define BLACK (LONG)0
  332. #define WHITE (LONG)0x00FFFFFF          /* For SetPixel rgbColor */
  333. #define FILENAMEMAX _MAX_PATH   /* Maximum allowed length of file names */
  334.  
  335. /*********
  336.  the following added 11-Sep-1986 to use dlgsave.c and dlgopen.c
  337. **********/
  338. #define   IDD_OPEN 1    /* dialog box ids */
  339. #define   IDD_SAVE 2
  340. #define   IDD_FORMAT 3
  341.  
  342. #define     MAX_STR_LEN     128
  343. #define     MAX_FNAME_LEN   128
  344. #define     CBEXTMAX        6   /* Number of bytes in "\*.ext" */
  345.  
  346.  
  347. #define NOSAVE  0   /* return flags for DlgFnSave() */
  348. #define NEWSAVE 1
  349. #define OLDSAVE 2
  350.  
  351. #define NOOPEN  0   /* return flags for DlgFnOpen() */
  352. #define NEWOPEN 1
  353. #define OLDOPEN 2
  354.  
  355. #define WORD_LIMIT    65534    /* max. number of bytes that can be read(written) by */
  356. #define SEGMENT_SIZE  65536    /* segment length in bytes */
  357.  
  358. /* abbreviations for accessing resource strings - LR */
  359.  
  360. #define vszNomPtSizeNotOk       vrgsz[IDS_NOMPTSIZENOTOK      ]
  361. #define vszNomVertResNotOk      vrgsz[IDS_NOMVERTRESNOTOK     ]
  362. #define vszNomHorResNotOk       vrgsz[IDS_NOMHORRESNOTOK      ]
  363. #define vszAscentTooBig         vrgsz[IDS_ASCENTTOOBIG        ]
  364. #define vszAscentNotOk          vrgsz[IDS_ASCENTNOTOK         ]
  365. #define vszExtLeadNotOk         vrgsz[IDS_EXTLEADNOTOK        ]
  366. #define vszIntLeadTooBig        vrgsz[IDS_INTLEADTOOBIG       ]
  367. #define vszIntLeadNotOk         vrgsz[IDS_INTLEADNOTOK        ]
  368. #define vszCharSetOutOfBounds   vrgsz[IDS_CHARSETOUTOFBOUNDS  ]
  369. #define vszDefCharOutsideFont   vrgsz[IDS_DEFCHAROUTSIDEFONT  ]
  370. #define vszDefCharNotOk         vrgsz[IDS_DEFCHARNOTOK        ]
  371. #define vszBreakCharOutsideFont vrgsz[IDS_BREAKCHAROUTSIDEFONT]
  372. #define vszBreakCharNotOk       vrgsz[IDS_BREAKCHARNOTOK      ]
  373. #define vszUnknownFace          vrgsz[IDS_UNKNOWNFACE         ]
  374. #define vszNoVarToFixChange     vrgsz[IDS_NOVARTOFIXCHANGE    ]
  375. #define vszTooBigFor20          vrgsz[IDS_TOOBIGFOR20         ]
  376. #define vszHeightOutOfBounds    vrgsz[IDS_HEIGHTOUTOFBOUNDS   ]
  377. #define vszWidthOutOfBounds     vrgsz[IDS_WIDTHOUTOFBOUNDS    ]
  378. #define vszChar1MoreThanDChar   vrgsz[IDS_CHAR1MORETHANDCHAR  ]
  379. #define vszChar1NotOk           vrgsz[IDS_CHAR1NOTOK          ]
  380. #define vszLastCharTooSmall     vrgsz[IDS_LASTCHARTOOSMALL    ]
  381. #define vszLastCharNotOk        vrgsz[IDS_LASTCHARNOTOK       ]
  382. #define vszCannotOpenClip       vrgsz[IDS_CANNOTOPENCLIP      ]
  383. #define vszCopyingToClip        vrgsz[IDS_COPYINGTOCLIP       ]
  384. #define vszNotEnoughMem         vrgsz[IDS_NOTENOUGHMEM        ]
  385. #define vszAllocatingSpace      vrgsz[IDS_ALLOCATINGSPACE     ]
  386. #define vszFontEdit             vrgsz[IDS_FONTEDIT            ]
  387. #define vszFontShow             vrgsz[IDS_FONTSHOW            ]
  388. #define vszDotFNT               vrgsz[IDS_DOTFNT              ]
  389. #define vszBlankDashBlank       vrgsz[IDS_BLANKDASHBLANK      ]
  390. #define vszErrorOpeningFile     vrgsz[IDS_ERROROPENINGFILE    ]
  391. #define vszErrorReadingHdr      vrgsz[IDS_ERRORREADINGHDR     ]
  392. #define vszUnknownFormat        vrgsz[IDS_UNKNOWNFORMAT       ]
  393. #define vszErrorReadingBody     vrgsz[IDS_ERRORREADINGBODY    ]
  394. #define vszFileTooLarge         vrgsz[IDS_FILETOOLARGE        ]
  395. #define vszErrorWritingHdr      vrgsz[IDS_ERRORWRITINGHDR     ]
  396. #define vszErrorWritingOffsets  vrgsz[IDS_ERRORWRITINGOFFSETS ]
  397. #define vszErrorWritingBody     vrgsz[IDS_ERRORWRITINGBODY    ]
  398. #define vszStarDotFNT           vrgsz[IDS_STARDOTFNT          ]
  399. #define vszUnknown              vrgsz[IDS_UNKNOWN             ]
  400. #define vszMaxWidth             vrgsz[IDS_MAXWIDTH            ]
  401. #define vszCharPixelWidth       vrgsz[IDS_CHARPIXELWIDTH      ]
  402. #define vszABOUT                vrgsz[IDS_ABOUT               ]
  403. #define vszDHeader              vrgsz[IDS_DHEADER             ]
  404. #define vszDResize              vrgsz[IDS_DRESIZE             ]
  405. #define vszDWidth               vrgsz[IDS_DWIDTH              ]
  406. #define vszEdLimits0To64        vrgsz[IDS_EDLIMITS0TO64       ]
  407. #define vszMaxWidthIncrease     vrgsz[IDS_MAXWIDTHINCREASE    ]
  408. #define vszCannotChangeWidth    vrgsz[IDS_CANNOTCHANGEWIDTH   ]
  409. #define vszWarning              vrgsz[IDS_WARNING             ]
  410. #define vszIncorrectPixWidth    vrgsz[IDS_INCORRECTPIXWIDTH   ]
  411. #define vszMaxWidthOutOfBounds  vrgsz[IDS_MAXWIDTHOUTOFBOUNDS ]
  412. #define vszAvgWidthOutOfBounds  vrgsz[IDS_AVGWIDTHOUTOFBOUNDS ]
  413. #define vszWidthBytesNotOk      vrgsz[IDS_WIDTHBYTESNOTOK     ]
  414. #define vszBitsOffsetNotOk      vrgsz[IDS_BITSOFFSETNOTOK     ]
  415. #define vszTableWidthsBad       vrgsz[IDS_TABLEWIDTHSBAD      ]
  416. #define vszTableOffsetsBad      vrgsz[IDS_TABLEOFFSETSBAD     ]
  417. #define vszcolors               vrgsz[IDS_COLOR               ]
  418. #define vszAppWorkspace         vrgsz[IDS_APPWORKSPACE        ]
  419. #define vszFileReadOnly         vrgsz[IDS_FILEREADONLY        ]
  420. #define vszErrorClip            vrgsz[IDS_ERRORCLIP           ]
  421. #define vszCHAR            vrgsz[IDS_CHAR            ]
  422. #define vszWIDTH        vrgsz[IDS_WIDTH            ]
  423. #define vszHEIGHT        vrgsz[IDS_HEIGHT        ]
  424.  
  425.  
  426.  
  427. /*------ fontedit.c -------*/
  428. extern VOID ResizeShow(VOID);
  429. extern VOID ScrollFont(VOID);
  430. extern VOID CharToBox(BYTE);
  431. extern VOID FontRename(CHAR *);
  432. extern VOID BoxToChar(BYTE);
  433. extern DWORD GetkStuff(VOID);
  434.  
  435. /*------ fontload.c -------*/
  436. extern VOID ToClipboard(BYTE, DWORD, DWORD);
  437. extern VOID BoxToClipboard(POINT, DWORD, DWORD);
  438. extern DWORD ClipboardToBox(POINT, DWORD, DWORD, BOOL);
  439.  
  440. /*------ fontdlg.c -------*/
  441. BOOL
  442. CommDlgOpen (
  443.     HWND   hWndParent,      /* window handle of parent window */
  444.     OFSTRUCT *pOfstrIn,     /* ptr to current file OFSTRUCT (->cBytes=0 if no
  445.                              * cur. file)*/
  446.     CHAR  *pszNewNameIn,    /* ptr to array which will get new file's name */
  447.     CHAR  *pszExtIn,        /* ptr to current default extension */
  448.     CHAR  *pszAppNameIn,    /* ptr to application name */
  449.     BOOL   fOpenType
  450.     );
  451.  
  452. BOOL
  453. CommDlgSaveAs(
  454.     HANDLE hInstance,
  455.     HWND   hWndParent,      /* window handle of parent window */
  456.     OFSTRUCT *pOfstrIn,     /* ptr to current file OFSTRUCT (->cBytes=0 if no
  457.                              * cur. file)*/
  458.     CHAR  *pszNewNameIn,    /* ptr to array which will get new file's name
  459.                              * (no path) */
  460.     CHAR  *pszExtIn,        /* ptr to current default extension */
  461.     CHAR  *pszAppNameIn     /* ptr to application name */
  462.     );
  463.  
  464. BOOL
  465. DlgMergeStrings(
  466.     CHAR   *szSrc,
  467.     CHAR   *szMerge,
  468.     CHAR   *szDst
  469.     );
  470.  
  471. /*------ fonthead.c -------*/
  472. extern VOID ErrorBox(HWND, CHAR *);
  473.  
  474. /*------ fontchar.c -------*/
  475. extern VOID ClearBox(VOID);
  476.  
  477. /*------ fontcvt.c --------*/
  478.  
  479. BOOL
  480. fConvStructInit ();
  481.  
  482. VOID
  483. vFontStructFromBuffer (
  484.              PBYTE           pjSourceBuff,
  485.             FontHeaderType  *pfhDestFHStruct
  486.         );
  487.  
  488. VOID
  489. vBufferFromFontStruct (
  490.              FontHeaderType  *pfhSourceFHStruct,
  491.             PBYTE           pjDestBuff
  492.         );
  493.  
  494. VOID
  495. vBufferFromFont30Struct (
  496.              FontHeader30    *pfh3SourceFH3Struct,
  497.             PBYTE           pjDestBuff
  498.         );
  499.  
  500. VOID
  501. vGlyphInfo20FromBuffer (
  502.              PBYTE           pjSourceBuff,
  503.             GLYPHINFO_20   *pgi2DestGI2Struct
  504.         );
  505.  
  506. VOID
  507. vGlyphInfo30FromBuffer (
  508.              PBYTE           pjSourceBuff,
  509.             GLYPHINFO_30   *pgi3DestGI3Struct
  510.         );
  511.  
  512. VOID
  513. vBufferFromGlyphInfo20 (
  514.              GLYPHINFO_20    *pgi2SrcGI2Struct,
  515.             PBYTE           pjDestBuff
  516.         );
  517.  
  518. VOID
  519. vBufferFromGlyphInfo30 (
  520.              GLYPHINFO_30    *pgi3SrcGI3Struct,
  521.             PBYTE           pjDestBuff
  522.         );
  523.  
  524. // dword alligned size of DIB scan in bytes
  525. #define CJ_DIB_SCAN(cx)  ((((cx) + 31) & ~31) >> 3)
  526.  
  527.