Imported from antiword-0.33.tar.gz.
[antiword.git] / VisualStudio-only / fonts_w.c
blob7aa20e731f36d29a8c7586cb5710826aaf458ba8
1 /*
2 * fonts_u.c
3 * Copyright (C) 1999-2001 A.J. van Os; Released under GPL
4 * modifed by Vince
5 * Description:
6 * Functions to deal with fonts (Windows version)
7 */
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <string.h>
12 #include "antiword.h"
13 #include "fontinfo.h"
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
26 FILE *
27 pOpenFontTableFile(void)
29 return NULL;
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
44 void
45 vCloseFont(void)
47 } /* end of vCloseFont */
50 * tOpenFont - make the given font the current font
52 * Returns the font reference number
54 draw_fontref
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
66 draw_fontref
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
76 const char *
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
90 long
91 lComputeStringWidth(char *szString, int iStringLength,
92 draw_fontref tFontRef, int iFontsize)
94 return iStringLength * 30; // enough to build only
95 } /* end of lComputeStringWidth */