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
);
17 /***********************************************************************
18 * EngineEnumerateFont16 (GDI.300)
21 EngineEnumerateFont16(LPSTR fontname
, FARPROC16 proc
, DWORD data
)
23 FIXME("(%s,%p,%lx),stub\n",fontname
,proc
,data
);
27 /***********************************************************************
28 * EngineDeleteFont16 (GDI.301)
30 WORD WINAPI
EngineDeleteFont16(LPFONTINFO16 lpFontInfo
)
34 /* untested, don't know if it works.
35 We seem to access some structure that is located after the
36 FONTINFO. The FONTINFO documentation says that there may
37 follow some char-width table or font bitmap or vector info.
38 I think it is some kind of font bitmap that begins at offset 0x52,
39 as FONTINFO goes up to 0x51.
40 If this is correct, everything should be implemented correctly.
42 if ( ((lpFontInfo
->dfType
& (RASTER_FONTTYPE
|DEVICE_FONTTYPE
))
43 == (RASTER_FONTTYPE
|DEVICE_FONTTYPE
))
44 && (LOWORD(lpFontInfo
->dfFace
) == LOWORD(lpFontInfo
)+0x6e)
45 && (handle
= *(WORD
*)(lpFontInfo
+0x54)) )
47 *(WORD
*)(lpFontInfo
+0x54) = 0;
53 /***********************************************************************
54 * EngineRealizeFont16 (GDI.302)
56 WORD WINAPI
EngineRealizeFont16(LPLOGFONT16 lplogFont
, LPTEXTXFORM16 lptextxform
, LPFONTINFO16 lpfontInfo
)
58 FIXME("(%p,%p,%p),stub\n",lplogFont
,lptextxform
,lpfontInfo
);
63 /***********************************************************************
64 * EngineRealizeFontExt16 (GDI.315)
66 WORD WINAPI
EngineRealizeFontExt16(LONG l1
, LONG l2
, LONG l3
, LONG l4
)
68 FIXME("(%08lx,%08lx,%08lx,%08lx),stub\n",l1
,l2
,l3
,l4
);
73 /***********************************************************************
74 * EngineGetCharWidth16 (GDI.303)
76 WORD WINAPI
EngineGetCharWidth16(LPFONTINFO16 lpFontInfo
, BYTE firstChar
, BYTE lastChar
, LPINT16 buffer
)
80 for (i
= firstChar
; i
<= lastChar
; i
++)
81 FIXME(" returns font's average width for range %d to %d\n", firstChar
, lastChar
);
82 *buffer
++ = lpFontInfo
->dfAvgWidth
; /* insert some charwidth functionality here; use average width for now */
86 /***********************************************************************
87 * EngineSetFontContext (GDI.304)
89 WORD WINAPI
EngineSetFontContext(LPFONTINFO16 lpFontInfo
, WORD data
)
95 /***********************************************************************
96 * EngineGetGlyphBMP (GDI.305)
98 WORD WINAPI
EngineGetGlyphBMP(WORD word
, LPFONTINFO16 lpFontInfo
, WORD w1
, WORD w2
, LPSTR string
, DWORD dword
, /*LPBITMAPMETRICS16*/ LPVOID metrics
)
104 /***********************************************************************
105 * EngineMakeFontDir (GDI.306)
107 DWORD WINAPI
EngineMakeFontDir(HDC16 hdc
, LPFONTDIR16 fontdir
, LPCSTR string
)
109 FIXME(" stub! (always fails)\n");
110 return -1; /* error */
114 /***********************************************************************
115 * EngineExtTextOut (GDI.314)
117 WORD WINAPI
EngineExtTextOut()