Compile fix for non OSS systems.
[wine/multimedia.git] / graphics / fontengine.c
blob1ea67c72c515bac796ed32ca8bf9e0ab6ca9daaf
1 /*
2 * True Type font engine support
4 * Copyright 1996 John Harvey
5 * Copyright 1998 David Lee Lambert
6 *
7 */
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <debug.h>
11 #include "windows.h"
12 #include "font.h"
16 /* ****************************************************************
17 * EngineEnumerateFont [GDI.300]
19 WORD WINAPI
20 EngineEnumerateFont(LPSTR fontname, FARPROC16 proc, DWORD data )
22 FIXME(font,"(%s,%p,%lx),stub\n",fontname,proc,data);
23 return 0;
26 /* ****************************************************************
27 * EngineDeleteFont [GDI.301]
29 WORD WINAPI EngineDeleteFont(LPFONTINFO16 lpFontInfo)
31 WORD handle;
33 /* untested, don't know if it works.
34 We seem to access some structure that is located after the
35 FONTINFO. The FONTINFO documentation says that there may
36 follow some char-width table or font bitmap or vector info.
37 I think it is some kind of font bitmap that begins at offset 0x52,
38 as FONTINFO goes up to 0x51.
39 If this is correct, everything should be implemented correctly.
41 if ( ((lpFontInfo->dfType & (RASTER_FONTTYPE|DEVICE_FONTTYPE))
42 == (RASTER_FONTTYPE|DEVICE_FONTTYPE))
43 && (LOWORD(lpFontInfo->dfFace) == LOWORD(lpFontInfo)+0x6e)
44 && (handle = *(WORD *)(lpFontInfo+0x54)) )
46 *(WORD *)(lpFontInfo+0x54) = 0;
47 GlobalFree16(handle);
49 return 1;
52 /* ****************************************************************
53 * EngineRealizeFont [GDI.302]
55 WORD WINAPI EngineRealizeFont(LPLOGFONT16 lplogFont, LPTEXTXFORM16 lptextxform, LPFONTINFO16 lpfontInfo)
57 FIXME(font,"(%p,%p,%p),stub\n",lplogFont,lptextxform,lpfontInfo);
59 return 0;
62 /* ****************************************************************
63 * EngineGetCharWidth [GDI.303]
65 WORD WINAPI EngineGetCharWidth(LPFONTINFO16 lpFontInfo, BYTE firstChar, BYTE lastChar, LPINT16 buffer)
67 int i;
69 for (i = firstChar; i <= lastChar; i++)
70 FIXME(font, " returns font's average width for range %d to %d\n", firstChar, lastChar);
71 *buffer++ = lpFontInfo->dfAvgWidth; /* insert some charwidth functionality here; use average width for now */
72 return 1;
75 /* ****************************************************************
76 * EngineSetFontContext [GDI.304]
78 WORD WINAPI EngineSetFontContext(LPFONTINFO16 lpFontInfo, WORD data)
80 FIXME(font, "stub?\n");
81 return 0;
84 /* ****************************************************************
85 * EngineGetGlyphBMP [GDI.305]
87 WORD WINAPI EngineGetGlyphBMP(WORD word, LPFONTINFO16 lpFontInfo, WORD w1, WORD w2, LPSTR string, DWORD dword, /*LPBITMAPMETRICS16*/ LPVOID metrics)
89 FIXME(font, "stub?\n");
90 return 0;
93 /* ****************************************************************
94 * EngineMakeFontDir [GDI.306]
96 DWORD WINAPI EngineMakeFontDir(HDC16 hdc, LPFONTDIR16 fontdir, LPCSTR string)
98 FIXME(font, " stub! (always fails)\n");
99 return -1; /* error */
103 /* ****************************************************************
104 * EngineExtTextOut [GDI.314]
107 WORD WINAPI EngineExtTextOut()
109 FIXME(font, "stub!\n");
110 return 0;