2 * True Type font engine support
4 * Copyright 1996 John Harvey
5 * Copyright 1998 David Lee Lambert
13 #include "debugtools.h"
15 DEFAULT_DEBUG_CHANNEL(font
)
19 /* ****************************************************************
20 * EngineEnumerateFont [GDI.300]
23 EngineEnumerateFont16(LPSTR fontname
, FARPROC16 proc
, DWORD data
)
25 FIXME("(%s,%p,%lx),stub\n",fontname
,proc
,data
);
29 /* ****************************************************************
30 * EngineDeleteFont [GDI.301]
32 WORD WINAPI
EngineDeleteFont16(LPFONTINFO16 lpFontInfo
)
36 /* untested, don't know if it works.
37 We seem to access some structure that is located after the
38 FONTINFO. The FONTINFO documentation says that there may
39 follow some char-width table or font bitmap or vector info.
40 I think it is some kind of font bitmap that begins at offset 0x52,
41 as FONTINFO goes up to 0x51.
42 If this is correct, everything should be implemented correctly.
44 if ( ((lpFontInfo
->dfType
& (RASTER_FONTTYPE
|DEVICE_FONTTYPE
))
45 == (RASTER_FONTTYPE
|DEVICE_FONTTYPE
))
46 && (LOWORD(lpFontInfo
->dfFace
) == LOWORD(lpFontInfo
)+0x6e)
47 && (handle
= *(WORD
*)(lpFontInfo
+0x54)) )
49 *(WORD
*)(lpFontInfo
+0x54) = 0;
55 /* ****************************************************************
56 * EngineRealizeFont [GDI.302]
58 WORD WINAPI
EngineRealizeFont16(LPLOGFONT16 lplogFont
, LPTEXTXFORM16 lptextxform
, LPFONTINFO16 lpfontInfo
)
60 FIXME("(%p,%p,%p),stub\n",lplogFont
,lptextxform
,lpfontInfo
);
65 /* ****************************************************************
66 * EngineRealizeFontExt [GDI.315]
68 WORD WINAPI
EngineRealizeFontExt16(LONG l1
, LONG l2
, LONG l3
, LONG l4
)
70 FIXME("(%08lx,%08lx,%08lx,%08lx),stub\n",l1
,l2
,l3
,l4
);
75 /* ****************************************************************
76 * EngineGetCharWidth [GDI.303]
78 WORD WINAPI
EngineGetCharWidth16(LPFONTINFO16 lpFontInfo
, BYTE firstChar
, BYTE lastChar
, LPINT16 buffer
)
82 for (i
= firstChar
; i
<= lastChar
; i
++)
83 FIXME(" returns font's average width for range %d to %d\n", firstChar
, lastChar
);
84 *buffer
++ = lpFontInfo
->dfAvgWidth
; /* insert some charwidth functionality here; use average width for now */
88 /* ****************************************************************
89 * EngineSetFontContext [GDI.304]
91 WORD WINAPI
EngineSetFontContext(LPFONTINFO16 lpFontInfo
, WORD data
)
97 /* ****************************************************************
98 * EngineGetGlyphBMP [GDI.305]
100 WORD WINAPI
EngineGetGlyphBMP(WORD word
, LPFONTINFO16 lpFontInfo
, WORD w1
, WORD w2
, LPSTR string
, DWORD dword
, /*LPBITMAPMETRICS16*/ LPVOID metrics
)
106 /* ****************************************************************
107 * EngineMakeFontDir [GDI.306]
109 DWORD WINAPI
EngineMakeFontDir(HDC16 hdc
, LPFONTDIR16 fontdir
, LPCSTR string
)
111 FIXME(" stub! (always fails)\n");
112 return -1; /* error */
116 /* ****************************************************************
117 * EngineExtTextOut [GDI.314]
120 WORD WINAPI
EngineExtTextOut()