2 * True Type font engine support
4 * Copyright 1996 John Harvey
12 WORD WINAPI
EngineEnumerateFont(LPSTR fontname
, FARPROC16 proc
, DWORD data
)
14 fprintf(stderr
,"EngineEnumerateFont(%s,%p,%lx),stub\n",fontname
,proc
,data
);
19 WORD WINAPI
EngineDeleteFont(LPFONTINFO16 lpFontInfo
)
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;
43 WORD WINAPI
EngineRealizeFont(LPLOGFONT16 lplogFont
, LPTEXTXFORM16 lptextxform
, LPFONTINFO16 lpfontInfo
)
45 fprintf(stderr
,"EngineRealizeFont(%p,%p,%p),stub\n",lplogFont
,lptextxform
,lpfontInfo
);
51 WORD WINAPI
EngineGetCharWidth(LPFONTINFO16 lpFontInfo
, BYTE firstChar
, BYTE lastChar
, LPINT16 buffer
)
55 for (i
= firstChar
; i
<= lastChar
; i
++)
56 *buffer
++ = lpFontInfo
->dfAvgWidth
; /* insert some charwidth functionality here; use average width for now */
61 WORD WINAPI
EngineSetFontContext(LPFONTINFO16 lpFontInfo
, WORD data
)
67 WORD WINAPI
EngineGetGlyphBMP(WORD word
, LPFONTINFO16 lpFontInfo
, WORD w1
, WORD w2
, LPSTR string
, DWORD dword
, /*LPBITMAPMETRICS16*/ LPVOID metrics
)
73 DWORD WINAPI
EngineMakeFontDir(HDC16 hdc
, LPFONTDIR16 fontdir
, LPCSTR string
)
75 return -1; /* error */
81 WORD WINAPI
EngineExtTextOut()