FILETXTOPTIONS

Summary

The FILETXTOPTIONS structure provides information on loading TXT files in LEADTOOLS.

Syntax

typedef struct _FILETXTOPTIONS 
{ 
   L_UINT uStructSize; 
   L_BOOL bEnabled; 
   L_COLORREF crFontColor; 
   L_COLORREF crHighlight; 
   L_INT nFontSize; 
   L_TCHAR szFaceName[LF_FACESIZE]; 
   L_BOOL bBold; 
   L_BOOL bItalic; 
   L_BOOL bUnderLine; 
   L_BOOL bStrikeThrough; 
   L_TEXT_ENCODING defaultEncoding; 
   L_COLORREF crBackColor; 
   L_TEXT_ANTI_ALIASING antiAliasing; 
   L_BOOL bWrap; 
   L_UINT uTabSize; 
} FILETXTOPTIONS, * pFILETXTOPTIONS; 

Members

uStructSize

Size of the structure. This must be set before passing this structure to the LEAD functions. Use sizeof(FILETXTOPTIONS) to calculate this value.

bEnabled

Flag that indicates whether to call the filter. Possible values are:

Value Meaning
TRUE Call the filter.
FALSE Do not call the filter.

crFontColor

The font color.

crHighlight

The high light color. Highlight is the color used as background for the text paragraphs found in the file. If you do not want to show the highlight color, set its value to the same as crFontColor or crBackColor.

nFontSize

The font size in points.

szFaceName

Character string that contains the text font face name.

antiAliasing

Indicates whether anti-aliasing should be used when drawing text. Possible values are:

Value Meaning
L_TEXT_ANTI_ALIASING_AUTO Let LEADTOOLS pick when to use anti-aliasing (Default). In this case, anti-aliasing is enabled when loading at >= 8 bpp and disabled for < 8 bpp.
L_TEXT_ANTI_ALIASING_ON Anti-aliasing is always on.
L_TEXT_ANTI_ALIASING_OFF Anti-aliasing is always off.

bBold

Flag that indicates whether to display the text as bold. Possible values are:

Value Meaning
TRUE Displays the text as bold.
FALSE Displays the text as not bold.

bItalic

Flag that indicates whether to display the text as italic. Possible values are:

Value Meaning
TRUE Displays the text as italic.
FALSE Displays the text as not italic.

bUnderLine

Flag that indicates whether to display the text underlined. Possible values are:

Value Meaning
TRUE Displays the text underlined.
FALSE Displays the text as not underlined.

bStrikeThrough

Flag that indicates whether to display the text with a strikethrough. Possible values are:

Value Meaning
TRUE Displays the text with a strikethrough.
FALSE Displays the text without a strikethrough.

bWrap

Flag that indicates whether long lines of text should be wrapped into several lines or truncated. Possible values are:

Value Meaning
TRUE Split long text lines into several rows (default).
FALSE Truncate long lines of text.

defaultEncoding

The text encoding for files without a byte-order mark (BOM). See L_TEXT_ENCODING for possible values.

This setting is ignored when loading files containing a BOM.

You can check whether a file has a BOM by getting the file information and examining whether FILEINFO.Flags contains the FILEINFO_HAS_BOM flag.

crBackColor

The background color. Background is the color used to fill the result image before rending the text on top of it.

uTabSize

The length of the spaces used for the tab character. Default is 4.

This value is used to replace a tab character in a text.

If set to 0, the tab will not be replaced. The result will depend on the drawing engine used to render the text.

Comments

pFILETXTOPTIONS is a pointer to a FILETXTOPTIONS structure.

Text files have no physical width or height in pixels. You can use RASTERIZEDOCOPTIONS to control how the final document is rendered as a raster image. For more information, refer to RASTERIZEDOCOPTIONS.

Usage

Help Version 22.0.2023.2.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.