Example #1
0
/*
 * tOpenTableFont - make the table font the current font
 *
 * Returns the font reference number
 */
drawfile_fontref
tOpenTableFont(USHORT usWordFontSize)
{
	options_type	tOptions;
	int	iWordFontnumber;

	NO_DBG_MSG("tOpenTableFont");

	vGetOptions(&tOptions);
	eEncoding = tOptions.eEncoding;
	bUsePlainText = tOptions.eConversionType != conversion_draw &&
			tOptions.eConversionType != conversion_ps &&
			tOptions.eConversionType != conversion_pdf;

	if (bUsePlainText) {
		/* Plain text, no fonts */
		return (drawfile_fontref)0;
	}

	iWordFontnumber = iFontname2Fontnumber(TABLE_FONT, FONT_REGULAR);
	if (iWordFontnumber < 0 || iWordFontnumber > (int)UCHAR_MAX) {
		DBG_DEC(iWordFontnumber);
		return (drawfile_fontref)0;
	}

	return tOpenFont((UCHAR)iWordFontnumber, FONT_REGULAR, usWordFontSize);
} /* end of tOpenTableFont */
Example #2
0
/*
 * tOpenTableFont - make the table font the current font
 *
 * Returns the font reference number for use in a draw file
 */
drawfile_fontref
tOpenTableFont(USHORT usWordFontSize)
{
    int	iWordFontnumber;

    NO_DBG_MSG("tOpenTableFont");

    iWordFontnumber = iFontname2Fontnumber(TABLE_FONT, FONT_REGULAR);
    if (iWordFontnumber < 0 || iWordFontnumber > (int)UCHAR_MAX) {
        DBG_DEC(iWordFontnumber);
        tFontCurr = (font_handle)-1;
        return (drawfile_fontref)0;
    }

    return tOpenFont((UCHAR)iWordFontnumber, FONT_REGULAR, usWordFontSize);
} /* end of tOpenTableFont */