Skip to main content
This object is used for setting up the parameters of font formatting detection during document or page synthesis. This object is passed as a subobject of SynthesisParamsForDocument or SynthesisParamsForPage object to recognition and synthesis methods. By default, all the Boolean properties of this object are set to TRUE. The FontFormattingDetectionParams object is a persistent object. This means that the object’s current state can be written to persistent storage. Later, the object can be re-created by reading the object’s state from the persistent storage. The following methods provide persistence of the object: Linux: SaveToFile, and LoadFromFile Windows SaveToFile, LoadFromFile, SaveToMemory, and LoadFromMemory.

Properties

Name

Type

Description

Application

Engine, read-only

Returns the Engine object.

Text decoration

DetectBold

VARIANT_BOOL

If this property is set to TRUE, boldface is detected during synthesis.

This property is set to TRUE by default.

DetectItalic

VARIANT_BOOL

If this property is set to TRUE, italic typeface is detected during synthesis.

This property is set to TRUE by default.

DetectSubscriptsSuperscripts

VARIANT_BOOL

If this property is set to TRUE, subscript and superscript are detected during synthesis.

This property is TRUE by default.

DetectUnderlineStrikeout

VARIANT_BOOL

If this property is set to TRUE, underline and strikeout are detected during synthesis.

This property is set to TRUE by default.

DetectSmallCaps

VARIANT_BOOL

If this property is set to TRUE, small capital letters are detected during synthesis.

This property is set to TRUE by default.

DetectDropCaps

VARIANT_BOOL

If this property is set to TRUE, drop capitals are detected during synthesis.

This property is set to TRUE by default.

Font attributes

DetectFontFamily

VARIANT_BOOL

If this property is set to TRUE, font name is detected during synthesis.

This property is set to TRUE by default.

DetectFontSize

VARIANT_BOOL

If this property is set to TRUE, font size is detected during synthesis.

This property is set to TRUE by default.

DetectSerifs

VARIANT_BOOL

If this property is set to TRUE, serif is detected during synthesis, i.e., if serif has been detected, serif typeface is selected to represent the recognized text. If this property is set to FALSE, serif is ignored. This means that the most suitable font (from both serif and sans serif typefaces) is selected to represent the recognized text, no matter whether the text is serif or sans serif.

This property is set to TRUE by default.

Scaling and spacing

DetectScaling

VARIANT_BOOL

If this property is set to TRUE, scaling is detected during synthesis.

This property is TRUE by default.

DetectSpacing

VARIANT_BOOL

If this property is set to TRUE, spacing is detected during synthesis.

This property is FALSE by default.

MonospaceDetectionMode

MonospaceDetectionModeEnum

Specifies the mode of monospace font detection.

The default mode is MDM_Auto.

Methods

NameDescription
CopyFromInitializes properties of the current object with values of similar properties of another object.
LoadFromFileRestores the object contents from a file on disk.
LoadFromMemory <Note> : Windows only. </Note>Restores the object contents from the global memory.
SaveToFileSaves the object contents into a file on disk.
SaveToMemory <Note> : Windows only. </Note>Saves the object contents into the global memory.
FontFormattingDetectionParams Object Diagram

Samples

The object is used in the following code samples for Linux and Windows: CommandLineInterface.

See also

Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis Working with Properties