Release 980329
[wine/multimedia.git] / graphics / fontengine.c
blobf261b133af3432ffdedbbc0a880ded6567f57958
1 /*
2 * True Type font engine support
4 * Copyright 1996 John Harvey
5 */
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include "windows.h"
9 #include "font.h"
11 /* GDI 300 */
12 WORD WINAPI EngineEnumerateFont(LPSTR fontname, FARPROC16 proc, DWORD data )
14 fprintf(stderr,"EngineEnumerateFont(%s,%p,%lx),stub\n",fontname,proc,data);
15 return 0;
18 /* GDI 301 */
19 WORD WINAPI EngineDeleteFont(LPFONTINFO16 lpFontInfo)
21 WORD handle;
23 /* untested, don't know if it works.
24 We seem to access some structure that is located after the
25 FONTINFO. The FONTINFO docu says that there may follow some char-width
26 table or font bitmap or vector info.
27 I think it is some kind of font bitmap that begins at offset 0x52,
28 as FONTINFO goes up to 0x51.
29 If this is correct, everything should be implemented correctly.
31 if ( ((lpFontInfo->dfType & (RASTER_FONTTYPE|DEVICE_FONTTYPE))
32 == (RASTER_FONTTYPE|DEVICE_FONTTYPE))
33 && (LOWORD(lpFontInfo->dfFace) == LOWORD(lpFontInfo)+0x6e)
34 && (handle = *(WORD *)(lpFontInfo+0x54)) )
36 *(WORD *)(lpFontInfo+0x54) = 0;
37 GlobalFree16(handle);
39 return 1;
42 /* GDI 302 */
43 WORD WINAPI EngineRealizeFont(LPLOGFONT16 lplogFont, LPTEXTXFORM16 lptextxform, LPFONTINFO16 lpfontInfo)
45 fprintf(stderr,"EngineRealizeFont(%p,%p,%p),stub\n",lplogFont,lptextxform,lpfontInfo);
47 return 0;
50 /* GDI 303 */
51 WORD WINAPI EngineGetCharWidth(LPFONTINFO16 lpFontInfo, BYTE firstChar, BYTE lastChar, LPINT16 buffer)
53 int i;
55 for (i = firstChar; i <= lastChar; i++)
56 *buffer++ = lpFontInfo->dfAvgWidth; /* insert some charwidth functionality here; use average width for now */
57 return 1;
60 /* GDI 304 */
61 WORD WINAPI EngineSetFontContext(LPFONTINFO16 lpFontInfo, WORD data)
63 return 0;
66 /* GDI 305 */
67 WORD WINAPI EngineGetGlyphBMP(WORD word, LPFONTINFO16 lpFontInfo, WORD w1, WORD w2, LPSTR string, DWORD dword, /*LPBITMAPMETRICS16*/ LPVOID metrics)
69 return 0;
72 /* GDI 306 */
73 DWORD WINAPI EngineMakeFontDir(HDC16 hdc, LPFONTDIR16 fontdir, LPCSTR string)
75 return -1; /* error */
79 /* GDI 314 */
81 WORD WINAPI EngineExtTextOut()
83 return 0;