Do not erase local files on uninstall if install dir does not exist.
[wine.git] / graphics / fontengine.c
blobeba7070317ecf91c0ede4d23005a91d3b8af006e
1 /*
2 * True Type font engine support
4 * Copyright 1996 John Harvey
5 * Copyright 1998 David Lee Lambert
6 *
7 */
8 #include <math.h>
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include "winbase.h"
12 #include "font.h"
13 #include "debugtools.h"
15 DEFAULT_DEBUG_CHANNEL(font)
19 /* ****************************************************************
20 * EngineEnumerateFont [GDI.300]
22 WORD WINAPI
23 EngineEnumerateFont16(LPSTR fontname, FARPROC16 proc, DWORD data )
25 FIXME("(%s,%p,%lx),stub\n",fontname,proc,data);
26 return 0;
29 /* ****************************************************************
30 * EngineDeleteFont [GDI.301]
32 WORD WINAPI EngineDeleteFont16(LPFONTINFO16 lpFontInfo)
34 WORD handle;
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;
50 GlobalFree16(handle);
52 return 1;
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);
62 return 0;
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);
72 return 0;
75 /* ****************************************************************
76 * EngineGetCharWidth [GDI.303]
78 WORD WINAPI EngineGetCharWidth16(LPFONTINFO16 lpFontInfo, BYTE firstChar, BYTE lastChar, LPINT16 buffer)
80 int i;
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 */
85 return 1;
88 /* ****************************************************************
89 * EngineSetFontContext [GDI.304]
91 WORD WINAPI EngineSetFontContext(LPFONTINFO16 lpFontInfo, WORD data)
93 FIXME("stub?\n");
94 return 0;
97 /* ****************************************************************
98 * EngineGetGlyphBMP [GDI.305]
100 WORD WINAPI EngineGetGlyphBMP(WORD word, LPFONTINFO16 lpFontInfo, WORD w1, WORD w2, LPSTR string, DWORD dword, /*LPBITMAPMETRICS16*/ LPVOID metrics)
102 FIXME("stub?\n");
103 return 0;
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()
122 FIXME("stub!\n");
123 return 0;