2 * X11 physical font definitions
4 * Copyright 1997 Alex Korobka
7 #ifndef __WINE_X11FONT_H
8 #define __WINE_X11FONT_H
14 /* this is a part of the font resource header, should
15 * make it easier to implement dynamic softfont loading */
24 INT16 dfInternalLeading
;
25 INT16 dfExternalLeading
;
33 CHAR dfPitchAndFamily
;
43 } IFONTINFO16
, *LPIFONTINFO16
;
49 #define FI_POLYWEIGHT 0x0001
50 #define FI_POLYSLANT 0x0002
51 #define FI_OBLIQUE 0x0004
52 #define FI_SCALABLE 0x0008
53 #define FI_FW_BOOK 0x0010
54 #define FI_FW_DEMI 0x0020
55 #define FI_VARIABLEPITCH 0x0040
56 #define FI_FIXEDPITCH 0x0080
58 #define FI_ENC_ISO8859 0x0100 /* iso8859-* */
59 #define FI_ENC_ISO646 0x0200 /* iso646* */
60 #define FI_ENC_ANSI 0x0400 /* ansi-0 */
61 #define FI_ENC_MSCODEPAGE 0x0800 /* cp125-* */
63 #define FI_FIXEDEX 0x1000
64 #define FI_NORMAL 0x2000
65 #define FI_SUBSET 0x4000
66 #define FI_TRUETYPE 0x8000
68 typedef struct tagFontInfo
70 struct tagFontInfo
* next
;
73 /* LFD parameters can be quite different from the actual metrics */
77 UINT16 lfd_decipoints
;
78 UINT16 lfd_resolution
;
83 /* Font resource list for EnumFont() purposes */
85 #define FR_SOFTFONT 0x1000 /* - .FON or .FOT file */
86 #define FR_SOFTRESOURCE 0x2000 /* - resource handle */
87 #define FR_REMOVED 0x4000 /* delayed remove */
88 #define FR_NAMESET 0x8000
90 typedef struct tagFontResource
92 struct tagFontResource
* next
;
97 CHAR lfFaceName
[LF_FACESIZE
];
100 #define FO_RESOURCE_MASK 0x000F
101 #define FO_SYSTEM 0x0001 /* resident in cache */
102 #define FO_SOFTFONT 0x0002 /* installed at runtime */
103 #define FO_SHARED 0x0004 /* MITSHM */
104 #define FO_REMOVED 0x0008 /* remove when count falls to 0 */
106 #define FO_MATCH_MASK 0x00F0
107 #define FO_MATCH_NORASTER 0x0010
108 #define FO_MATCH_PAF 0x0020
109 #define FO_MATCH_XYINDEP 0x0040
111 #define FO_SYNTH_MASK 0xFF00
112 #define FO_SYNTH_HEIGHT 0x2000
113 #define FO_SYNTH_WIDTH 0x4000
114 #define FO_SYNTH_ROTATE 0x8000
115 #define FO_SYNTH_BOLD 0x0100
116 #define FO_SYNTH_ITALIC 0x0200
117 #define FO_SYNTH_UNDERLINE 0x0400
118 #define FO_SYNTH_STRIKEOUT 0x0800
120 /* Realized screen font */
124 XFontStruct
* fs
; /* text metrics */
125 fontResource
* fr
; /* font family */
126 fontInfo
* fi
; /* font instance info */
127 LPMAT2
* lpXForm
; /* optional transformation matrix */
128 Pixmap
* lpPixmap
; /* optional character bitmasks for synth fonts */
130 INT16 foInternalLeading
;
131 INT16 foAvgCharWidth
;
134 /* font cache housekeeping */
153 LPLOGFONT16 lpLogFontParam
;
154 FONTENUMPROC16 lpEnumFunc
;
157 LPNEWTEXTMETRICEX16 lpTextMetric
;
158 LPENUMLOGFONTEX16 lpLogFont
;
159 SEGPTR segTextMetric
;
165 LPLOGFONT32W lpLogFontParam
;
166 FONTENUMPROC32W lpEnumFunc
;
169 LPNEWTEXTMETRICEX32W lpTextMetric
;
170 LPENUMLOGFONTEX32W lpLogFont
;
174 extern fontObject
* XFONT_GetFontObject( X_PHYSFONT pFont
);
175 extern XFontStruct
* XFONT_GetFontStruct( X_PHYSFONT pFont
);
176 extern LPIFONTINFO16
XFONT_GetFontInfo( X_PHYSFONT pFont
);
178 #endif __WINE_X11FONT_H