Added ctrl-c support.
[wine.git] / include / font.h
blob8ec8100440d5a7368238aecaf22a7a9ef346df04
1 /*
2 * GDI font definitions
4 * Copyright 1994 Alexandre Julliard
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_FONT_H
22 #define __WINE_FONT_H
24 #include "gdi.h"
26 #include "pshpack1.h"
28 /* GDI logical font object */
29 typedef struct
31 GDIOBJHDR header;
32 LOGFONTW logfont;
33 } FONTOBJ;
35 typedef struct {
36 WORD dfVersion;
37 DWORD dfSize;
38 CHAR dfCopyright[60];
39 WORD dfType;
40 WORD dfPoints;
41 WORD dfVertRes;
42 WORD dfHorizRes;
43 WORD dfAscent;
44 WORD dfInternalLeading;
45 WORD dfExternalLeading;
46 BYTE dfItalic;
47 BYTE dfUnderline;
48 BYTE dfStrikeOut;
49 WORD dfWeight;
50 BYTE dfCharSet;
51 WORD dfPixWidth;
52 WORD dfPixHeight;
53 BYTE dfPitchAndFamily;
54 WORD dfAvgWidth;
55 WORD dfMaxWidth;
56 BYTE dfFirstChar;
57 BYTE dfLastChar;
58 BYTE dfDefaultChar;
59 BYTE dfBreakChar;
60 WORD dfWidthBytes;
61 DWORD dfDevice;
62 DWORD dfFace;
63 DWORD dfReserved;
64 CHAR szDeviceName[60]; /* FIXME: length unknown */
65 CHAR szFaceName[60]; /* dito */
66 } FONTDIR16, *LPFONTDIR16;
68 #include "poppack.h"
70 #define FONTCACHE 32 /* dynamic font cache size */
72 extern BOOL FONT_Init( UINT16* pTextCaps );
73 extern void FONT_LogFontATo16( const LOGFONTA* font32, LPLOGFONT16 font16 );
74 extern void FONT_LogFontWTo16( const LOGFONTW* font32, LPLOGFONT16 font16 );
75 extern void FONT_LogFont16ToA( const LOGFONT16* font16, LPLOGFONTA font32 );
76 extern void FONT_LogFont16ToW( const LOGFONT16* font16, LPLOGFONTW font32 );
77 extern void FONT_TextMetricATo16(const TEXTMETRICA *ptm32, LPTEXTMETRIC16 ptm16 );
78 extern void FONT_TextMetricWTo16(const TEXTMETRICW *ptm32, LPTEXTMETRIC16 ptm16 );
79 extern void FONT_TextMetric16ToA(const TEXTMETRIC16 *ptm16, LPTEXTMETRICA ptm32 );
80 extern void FONT_TextMetric16ToW(const TEXTMETRIC16 *ptm16, LPTEXTMETRICW ptm32 );
81 extern void FONT_TextMetricAToW(const TEXTMETRICA *ptm32A, LPTEXTMETRICW ptm32W );
82 extern void FONT_NewTextMetricEx16ToW(const NEWTEXTMETRICEX16*, LPNEWTEXTMETRICEXW);
83 extern void FONT_EnumLogFontEx16ToW(const ENUMLOGFONTEX16*, LPENUMLOGFONTEXW);
85 extern LPWSTR FONT_mbtowc(HDC, LPCSTR, INT, INT*, UINT*);
87 extern GdiFont WineEngCreateFontInstance(DC*, HFONT);
88 extern BOOL WineEngDestroyFontInstance(HFONT handle);
89 extern DWORD WineEngEnumFonts(LPLOGFONTW, DEVICEFONTENUMPROC, LPARAM);
90 extern BOOL WineEngGetCharWidth(GdiFont, UINT, UINT, LPINT);
91 extern DWORD WineEngGetFontData(GdiFont, DWORD, DWORD, LPVOID, DWORD);
92 extern DWORD WineEngGetGlyphIndices(GdiFont font, LPCWSTR lpstr, INT count,
93 LPWORD pgi, DWORD flags);
94 extern DWORD WineEngGetGlyphOutline(GdiFont, UINT glyph, UINT format,
95 LPGLYPHMETRICS, DWORD buflen, LPVOID buf,
96 const MAT2*);
97 extern UINT WineEngGetOutlineTextMetrics(GdiFont, UINT, LPOUTLINETEXTMETRICW);
98 extern BOOL WineEngGetTextExtentPoint(GdiFont, LPCWSTR, INT, LPSIZE);
99 extern BOOL WineEngGetTextExtentPointI(GdiFont, const WORD *, INT, LPSIZE);
100 extern BOOL WineEngGetTextMetrics(GdiFont, LPTEXTMETRICW);
101 extern BOOL WineEngInit(void);
103 #endif /* __WINE_FONT_H */