3 * Copyright (C) 1999-2001 A.J. van Os; Released under GPL
6 * Functions to deal with fonts (Windows version)
15 /* Don't use fonts, just plain text */
16 static BOOL bUsePlainText
= TRUE
;
17 /* Which character set should be used */
18 static encoding_type eEncoding
= encoding_neutral
;
22 * pOpenFontTableFile - open the Font translation file
24 * Returns the file pointer or NULL
27 pOpenFontTableFile(void)
30 /* TBD .. new code , probably based on
31 int EnumFontFamiliesEx(
32 HDC hdc, // handle to device context
33 LPLOGFONT lpLogfont, // pointer to logical font information
34 FONTENUMPROC lpEnumFontFamExProc, // pointer to callback function
35 LPARAM lParam, // application-supplied data
36 DWORD dwFlags // reserved; must be zero
39 } /* end of pOpenFontTableFile */
42 * vCloseFont - close the current font, if any
47 } /* end of vCloseFont */
50 * tOpenFont - make the given font the current font
52 * Returns the font reference number
55 tOpenFont(int iWordFontNumber
, unsigned char ucFontstyle
, int iWordFontsize
)
57 /* No outline fonts, no postscript just plain text */
58 return (draw_fontref
)0;
59 } /* end of tOpenFont */
62 * tOpenTableFont - make the table font the current font
64 * Returns the font reference number
67 tOpenTableFont(int iWordFontsize
)
69 /* No outline fonts, no postscript just plain text */
70 return (draw_fontref
)0;
71 } /* end of tOpenTableFont */
74 * szGetFontname - get the fontname
77 szGetFontname(draw_fontref tFontRef
)
79 return "Dummy font name";
80 } /* end of szGetFontname */
83 * lComputeStringWidth - compute the string width
85 * Note: the fontsize is given in half-points!
86 * the stringlength is given in bytes, not characters!
88 * Returns the string width in millipoints
91 lComputeStringWidth(char *szString
, int iStringLength
,
92 draw_fontref tFontRef
, int iFontsize
)
94 return iStringLength
* 30; // enough to build only
95 } /* end of lComputeStringWidth */