blob: bedf60a2ba400d309bdd5cfa0d13fa7c5d5fde06 [file] [log] [blame]
Alexandre Julliard7cbe6571995-01-09 18:21:16 +00001/*
2 * GDI font definitions
3 *
4 * Copyright 1994 Alexandre Julliard
5 */
6
Alexandre Julliard234bc241994-12-10 13:02:28 +00007#ifndef __WINE_FONT_H
8#define __WINE_FONT_H
9
Alexandre Julliard7cbe6571995-01-09 18:21:16 +000010#include "gdi.h"
11
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +000012#include "pshpack1.h"
Alexandre Julliard7cbe6571995-01-09 18:21:16 +000013
14 /* GDI logical font object */
15typedef struct
16{
17 GDIOBJHDR header;
Huw D M Davies2aa85ee2001-02-14 22:56:38 +000018 LOGFONTW logfont;
Alexandre Julliard7cbe6571995-01-09 18:21:16 +000019} FONTOBJ;
20
Alexandre Julliard03468f71998-02-15 19:40:49 +000021typedef struct {
22 WORD dfVersion;
23 DWORD dfSize;
24 CHAR dfCopyright[60];
25 WORD dfType;
26 WORD dfPoints;
27 WORD dfVertRes;
28 WORD dfHorizRes;
29 WORD dfAscent;
30 WORD dfInternalLeading;
31 WORD dfExternalLeading;
32 BYTE dfItalic;
33 BYTE dfUnderline;
34 BYTE dfStrikeOut;
35 WORD dfWeight;
36 BYTE dfCharSet;
37 WORD dfPixWidth;
38 WORD dfPixHeight;
39 BYTE dfPitchAndFamily;
40 WORD dfAvgWidth;
41 WORD dfMaxWidth;
42 BYTE dfFirstChar;
43 BYTE dfLastChar;
44 BYTE dfDefaultChar;
45 BYTE dfBreakChar;
46 WORD dfWidthBytes;
47 DWORD dfDevice;
48 DWORD dfFace;
49 DWORD dfReserved;
50 CHAR szDeviceName[60]; /* FIXME: length unknown */
51 CHAR szFaceName[60]; /* dito */
52} FONTDIR16, *LPFONTDIR16;
53
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +000054#include "poppack.h"
Alexandre Julliardca22b331996-07-12 19:02:39 +000055
Alexandre Julliard349a9531997-02-02 19:01:52 +000056#define FONTCACHE 32 /* dynamic font cache size */
Alexandre Julliard349a9531997-02-02 19:01:52 +000057
Alexandre Julliarda3960291999-02-26 11:11:13 +000058extern BOOL FONT_Init( UINT16* pTextCaps );
Alexandre Julliard23946ad1997-06-16 17:43:53 +000059extern INT16 FONT_GetObject16( FONTOBJ * font, INT16 count, LPSTR buffer );
Alexandre Julliarda3960291999-02-26 11:11:13 +000060extern INT FONT_GetObjectA( FONTOBJ * font, INT count, LPSTR buffer );
61extern INT FONT_GetObjectW( FONTOBJ * font, INT count, LPSTR buffer );
Huw D M Davies2aa85ee2001-02-14 22:56:38 +000062extern void FONT_LogFontATo16( const LOGFONTA* font32, LPLOGFONT16 font16 );
63extern void FONT_LogFontWTo16( const LOGFONTW* font32, LPLOGFONT16 font16 );
64extern void FONT_LogFont16ToA( const LOGFONT16* font16, LPLOGFONTA font32 );
65extern void FONT_LogFont16ToW( const LOGFONT16* font16, LPLOGFONTW font32 );
66extern void FONT_TextMetricATo16(const TEXTMETRICA *ptm32, LPTEXTMETRIC16 ptm16 );
67extern void FONT_TextMetricWTo16(const TEXTMETRICW *ptm32, LPTEXTMETRIC16 ptm16 );
68extern void FONT_TextMetric16ToA(const TEXTMETRIC16 *ptm16, LPTEXTMETRICA ptm32 );
69extern void FONT_TextMetric16ToW(const TEXTMETRIC16 *ptm16, LPTEXTMETRICW ptm32 );
70extern void FONT_TextMetricAToW(const TEXTMETRICA *ptm32A, LPTEXTMETRICW ptm32W );
71extern void FONT_NewTextMetricEx16ToW(const NEWTEXTMETRICEX16*, LPNEWTEXTMETRICEXW);
72extern void FONT_EnumLogFontEx16ToW(const ENUMLOGFONTEX16*, LPENUMLOGFONTEXW);
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000073
Huw D M Davies29382422001-09-19 20:32:07 +000074extern LPWSTR FONT_mbtowc(HDC, LPCSTR, INT, INT*, UINT*);
75
Huw D M Davies814654e2001-09-12 20:21:06 +000076extern DWORD WineEngAddRefFont(GdiFont);
77extern GdiFont WineEngCreateFontInstance(HFONT);
78extern DWORD WineEngDecRefFont(GdiFont);
79extern DWORD WineEngEnumFonts(LPLOGFONTW, DEVICEFONTENUMPROC, LPARAM);
80extern BOOL WineEngGetCharWidth(GdiFont, UINT, UINT, LPINT);
81extern DWORD WineEngGetGlyphOutline(GdiFont, UINT glyph, UINT format,
82 LPGLYPHMETRICS, DWORD buflen, LPVOID buf,
83 const MAT2*);
84extern UINT WineEngGetOutlineTextMetrics(GdiFont, UINT, LPOUTLINETEXTMETRICW);
85extern BOOL WineEngGetTextExtentPoint(GdiFont, LPCWSTR, INT, LPSIZE);
86extern BOOL WineEngGetTextMetrics(GdiFont, LPTEXTMETRICW);
87extern BOOL WineEngInit(void);
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000088
Alexandre Julliard234bc241994-12-10 13:02:28 +000089#endif /* __WINE_FONT_H */