Eggplant Functional Text Preferences
These settings define the text platforms that are available for use in text property lists. Each platform includes a Text Engine, and any number of predefined text styles. Click Advanced Platform Options to select the languages you want made available to Eggplant Functional (EPF) for use in OCR searches. {#text-preferences}

Text Preferences panel in Eggplant Functional
Text Properties Panel Overview
Text Style
A text style is a saved set of text properties as defined in the Eggplant Functional Text Preferences, OCR Tuner, or OCR Update panel. Each text style is typically tailored to a particular font or type of GUI element, such as a menu item or title bar that will be encountered repeatedly in an application under test. Text styles can be applied to both OCR searches and ReadText(). For more on the difference between reading and searching, see How to Use OCR.
The panel opens with the Default style selected. Once you modify the OCR Properties in the sections below this one, you have altered the current style. To save this new style, select the word "Default" in the Text Style drop-down menu and change the name, or select the style you want to override (the Default style can be modified). Click Save Style.
To delete the current selected style, click Delete Style. This option is disabled when the Default style is selected.
To the right of this section is the copy icon. This can be used to copy the current text properties as you have them set in the following sections for use in your script. For more on this see Save or Copy Property Settings.
Contrast Section
The Contrast section allows you to set and work with the Contrast property and related properties. The Contrast setting converts the image OCR takes of the system under test (SUT) to black and white before sending it to the OCR engine for recognition. This interactive section has a live-update area to the right that shows the current search rectangle as it is drawn in your Viewer window, and how it will be sent to the OCR engine with the current Contrast settings.
-
Contrast: Whether or not the SUT display is converted to a high contrast two-color image before it is sent to OCR for analysis. If
contrastis on, a color referred to as the "contrast color" (which can be set using theContrastColorproperty) is considered the primary color of the SUT display, and all other colors are treated as the secondary color. Text can be found in either color. TheContrastproperty is available for use with both searching for (finding) text and reading text.- Contrast Color: If
Contrastis on, the contrast color is considered the primary color of the SUT display, and all other colors are treated as the secondary color. For instructions on finding the background color, see Determining the Background Color. - Contrast Tolerance: When
Contrastis on,contrastTolerancesets the maximum per-channel color difference that is allowed for a pixel to be seen as the contrast color.
- Contrast Color: If
The Find Tab
The upper-right quadrant of the panel has two tabs: Find and Read. This is because OCR can be used to either find a given string of text, or read unknown text off of the SUT screen. Some properties are only available for use when reading text, or for searching text, but not both. The Find tab displays the following properties that can be set when searching for a given string of text. For more on the differences between reading and finding text, see How to Use OCR.
Case Sensitive: {#casesensitive}Whether or not Eggplant Functional considers case in text searches. Enable this property to force text searches to respect case and only find text that matches your text string’s capitalization exactly. This property is for searching for text, not reading text.
Ignore Spaces: The ignoreSpaces property causes OCR text searches to disregard spaces in your text string. For example, the string "My Computer" would match "MyComputer" or "M y C o m p u t e r". The ignoreSpaces property is on by default. This is because the OCR sometimes reads spaces that are not intended, especially in strings that are not discrete words, and in text with unusual letter-spacing.
Ignore Underscores: The ignoreUnderscores property causes OCR text searches to treat underscores as spaces during searches. For example, the string "My_Computer" would match "My_Computer" or "My Computer". The ignoreUnderscores property is on by default, because the OCR sometimes fails to recognize underscores.
Ignore Newlines: {#ignorenewlines}When enabled, ignoreNewlines causes OCR text searches to ignore line breaks, so a search will match a string even if it's broken over several lines. This property is only available for text searches (not available with ReadText).
Text Difference: This property causes text searches to find text that differs from your search by a given number of characters. Only available with OCR searches.