1 /*
2  * PROJECT:     ReactOS VGA Font Editor
3  * LICENSE:     GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE:     CPI (Code Page Information) MS-DOS-compatible Fonts
5  *              We support only screen fonts, not printer fonts.
6  *              No DR-DOS/Novell-DOS compressed font format support.
7  * COPYRIGHT:   Copyright 2014 Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8  */
9 
10 #ifndef __CPI_H
11 #define __CPI_H
12 
13 typedef struct _CPI_HEADER
14 {
15     UCHAR   uId0;
16     UCHAR   uId[7];
17     UCHAR   uReserved[8];
18     USHORT  uNumPtr;
19     UCHAR   uPtrType;
20     ULONG   uFntInfoHdrOffset;
21 
22     // FIXME: Put it in another struct ??
23     USHORT  uNumCodePages;
24 } CPI_HEADER, *PCPI_HEADER;
25 
26 typedef struct _CPENTRY_HEADER
27 {
28     USHORT  uHdrSize;
29     ULONG   uNextCPEHOffset;
30     USHORT  uDeviceType;
31     UCHAR   uDeviceName[8];
32     USHORT  uCodePage;
33     UCHAR   uReserved[6];
34     ULONG   uCPIHOffset;
35 } CPENTRY_HEADER, *PCPENTRY_HEADER;
36 
37 typedef struct _CPINFO_HEADER
38 {
39     USHORT  uVersion;
40     USHORT  uNumFonts;
41     USHORT  uSize;  // uFontSize
42 } CPINFO_HEADER, *PCPINFO_HEADER;
43 
44 typedef struct _SCRFONT_HEADER
45 {
46     UCHAR   uHeight;
47     UCHAR   uWidth;
48     USHORT  uReserved;
49     USHORT  uNumChars;
50 } SCRFONT_HEADER, *PSCRFONT_HEADER;
51 
52 #endif
53