~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/winex11.drv/x11font.h

Version: ~ [ wine-1.5.31 ] ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * X11 physical font definitions
  3  *
  4  * Copyright 1997 Alex Korobka
  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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 19  */
 20 
 21 #ifndef __WINE_X11FONT_H
 22 #define __WINE_X11FONT_H
 23 
 24 #include "wine/wingdi16.h"
 25 #include "x11drv.h"
 26 #include "pshpack1.h"
 27 
 28 /* this is a part of the font resource header, should
 29  * make it easier to implement dynamic softfont loading */
 30 
 31 typedef struct
 32 {
 33     INT16       dfType;
 34     INT16       dfPoints;
 35     INT16       dfVertRes;
 36     INT16       dfHorizRes;
 37     INT16       dfAscent;
 38     INT16       dfInternalLeading;
 39     INT16       dfExternalLeading;
 40     CHAR        dfItalic;
 41     CHAR        dfUnderline;
 42     CHAR        dfStrikeOut;
 43     INT16       dfWeight;
 44     BYTE        dfCharSet;
 45     INT16       dfPixWidth;
 46     INT16       dfPixHeight;
 47     CHAR        dfPitchAndFamily;
 48     INT16       dfAvgWidth;
 49     INT16       dfMaxWidth;
 50     CHAR        dfFirstChar;
 51     CHAR        dfLastChar;
 52     CHAR        dfDefaultChar;
 53     CHAR        dfBreakChar;
 54     INT16       dfWidthBytes;
 55     LPCSTR      dfDevice;
 56     LPCSTR      dfFace;
 57 } IFONTINFO16, *LPIFONTINFO16;
 58 
 59 #include "poppack.h"
 60 
 61 /* internal flags */
 62 
 63 #define FI_POLYWEIGHT       0x0001
 64 #define FI_POLYSLANT        0x0002
 65 #define FI_OBLIQUE          0x0004
 66 #define FI_SCALABLE         0x0008
 67 #define FI_FW_BOOK          0x0010
 68 #define FI_FW_DEMI          0x0020
 69 #define FI_VARIABLEPITCH    0x0040
 70 #define FI_FIXEDPITCH       0x0080
 71 
 72 #define FI_FIXEDEX          0x1000
 73 #define FI_NORMAL           0x2000
 74 #define FI_SUBSET           0x4000
 75 #define FI_TRUETYPE         0x8000
 76 
 77 /* code pages */
 78 
 79 #define FI_ENC_ANSI             0
 80 #define FI_ENC_ISO8859          1
 81 #define FI_ENC_ISO646           2
 82 #define FI_ENC_MICROSOFT        3
 83 #define FI_ENC_KOI8             4
 84 #define FI_ENC_ASCII            5
 85 #define FI_ENC_VISCII           6
 86 #define FI_ENC_TCVN             7
 87 #define FI_ENC_TIS620           8
 88 
 89 enum X11DRV_CPTABLE
 90 {
 91     X11DRV_CPTABLE_SBCS,
 92     X11DRV_CPTABLE_UNICODE,
 93     X11DRV_CPTABLE_CP932,
 94     X11DRV_CPTABLE_CP936,
 95     X11DRV_CPTABLE_CP949,
 96     X11DRV_CPTABLE_CP950,
 97     X11DRV_CPTABLE_SYMBOL,
 98     X11DRV_CPTABLE_COUNT
 99 };
100 
101 typedef struct tagFontInfo
102 {
103     struct tagFontInfo*         next;
104     UINT16                      fi_flags;
105     UINT16                      fi_encoding;
106     UINT16                      codepage;
107     UINT16                      cptable;
108     WORD                        internal_charset;
109 
110  /* LFD parameters can be quite different from the actual metrics */
111 
112     UINT16                      lfd_height;
113     UINT16                      lfd_resolution;
114     IFONTINFO16                 df;
115 } fontInfo;
116 
117 /* Font resource list for EnumFont() purposes */
118 
119 #define FR_SOFTFONT         0x1000              /* - .FON or .FOT file */
120 #define FR_SOFTRESOURCE     0x2000              /* - resource handle */
121 #define FR_REMOVED          0x4000              /* delayed remove */
122 #define FR_NAMESET          0x8000
123 
124 #define LFD_FIELDS 14
125 typedef struct
126 {
127     const char* foundry;
128     const char* family;
129     const char* weight;
130     const char* slant;
131     const char* set_width;
132     const char* add_style;
133     const char* pixel_size;
134     const char* point_size;
135     const char* resolution_x;
136     const char* resolution_y;
137     const char* spacing;
138     const char* average_width;
139     const char* charset_registry;
140     const char* charset_encoding;
141 } LFD;
142 
143 typedef struct tagFontResource
144 {
145   struct tagFontResource*       next;
146   UINT16                        fr_flags;
147   UINT16                        fr_penalty;
148   UINT16                        fi_count;
149   UINT16                        fo_count;
150   fontInfo*                     fi;
151   LFD*                          resource;
152   HANDLE                        hOwner;         /*  For FR_SOFTFONT/FR_SOFTRESOURCE fonts */
153   CHAR                          lfFaceName[LF_FACESIZE];
154 } fontResource;
155 
156 typedef struct {
157   float         a,b,c,d;        /* pixelsize matrix, FIXME: switch to MAT2 format */
158   unsigned long RAW_ASCENT;
159   unsigned long RAW_DESCENT;
160   float         pixelsize;
161   float         ascent;
162   float         descent;
163 } XFONTTRANS;
164 
165 #define FO_RESOURCE_MASK        0x000F
166 #define FO_SYSTEM               0x0001          /* resident in cache */
167 #define FO_SOFTFONT             0x0002          /* installed at runtime */
168 #define FO_SHARED               0x0004          /* MITSHM */
169 #define FO_REMOVED              0x0008          /* remove when count falls to 0 */
170 
171 #define FO_MATCH_MASK           0x00F0
172 #define FO_MATCH_NORASTER       0x0010
173 #define FO_MATCH_PAF            0x0020
174 #define FO_MATCH_XYINDEP        0x0040
175 
176 #define FO_SYNTH_MASK           0xFF00
177 #define FO_SYNTH_HEIGHT         0x2000
178 #define FO_SYNTH_WIDTH          0x4000
179 #define FO_SYNTH_ROTATE         0x8000
180 #define FO_SYNTH_BOLD           0x0100
181 #define FO_SYNTH_ITALIC         0x0200
182 #define FO_SYNTH_UNDERLINE      0x0400
183 #define FO_SYNTH_STRIKEOUT      0x0800
184 
185 /* Realized screen font */
186 
187 #define X11FONT_REFOBJS_MAX             4
188 
189 typedef struct
190 {
191   XFontStruct*          fs;                     /* text metrics */
192   fontResource*         fr;                     /* font family */
193   fontInfo*             fi;                     /* font instance info */
194   Pixmap*               lpPixmap;               /* optional character bitmasks for synth fonts */
195   X_PHYSFONT            prefobjs[X11FONT_REFOBJS_MAX];  /* font objects for DBCS charsets */
196 
197   XFONTTRANS            *lpX11Trans;            /* Info for X11R6 transform */
198   float                 rescale;                /* Rescale for large fonts */
199   INT16                 foInternalLeading;
200   INT16                 foAvgCharWidth;
201   INT16                 foMaxCharWidth;
202   UINT16                fo_flags;
203 
204   /* font cache housekeeping */
205 
206   UINT16                count;
207   UINT16                lru;
208   UINT16                lfchecksum;
209   LOGFONT16             lf;
210 } fontObject;
211 
212 typedef struct
213 {
214   fontResource*         pfr;
215   fontInfo*             pfi;
216   UINT16                height;
217   UINT16                flags;
218   LPLOGFONT16           plf;
219   WORD                  internal_charset;
220 } fontMatch;
221 
222 extern fontObject* XFONT_GetFontObject( X_PHYSFONT pFont );
223 extern XFontStruct* XFONT_GetFontStruct( X_PHYSFONT pFont );
224 
225 /* internal charset(hibyte must be set) */
226 /* lobyte is DEFAULT_CHARSET(=0). */
227 #define X11FONT_JISX0201_CHARSET        0x100
228 #define X11FONT_JISX0212_CHARSET        0x200
229 
230 typedef struct tagX11DRV_CP
231 {
232     WORD (*penum_subfont_charset)( UINT index );
233     XChar2b* (*punicode_to_char2b)( fontObject* pfo,
234                                     LPCWSTR lpwstr, UINT count );
235     void (*pDrawString)( fontObject* pfo, Display* pdisp, Drawable d, GC gc,
236                          int x, int y, XChar2b* pstr, int count );
237     int (*pTextWidth)( fontObject* pfo, XChar2b* pstr, int count );
238     void (*pDrawText)( fontObject* pfo, Display* pdisp, Drawable d, GC gc,
239                        int x, int y, XTextItem16* pitems, int count );
240     void (*pTextExtents)( fontObject* pfo, XChar2b* pstr, int count,
241                           int* pdir, int* pascent, int* pdescent,
242                           int* pwidth, int max_extent, int *pfit,
243                           int* partial_extents );
244     void (*pGetTextMetricsW)( fontObject* pfo, LPTEXTMETRICW pTM );
245 } X11DRV_CP;
246 
247 extern const X11DRV_CP X11DRV_cptable[X11DRV_CPTABLE_COUNT];
248 
249 #endif /* __WINE_X11FONT_H */
250 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.