Text Layout Configuration

In PowerGREP, a "text layout" is a combination of settings that control how an edit control displays text and how the text cursor navigates through that text. The settings include the font, text direction, text cursor behavior, which characters are word characters, and how the text should be spaced. You can select a text layout for the edit boxes on the File Selector, Action, Library, and Sequence panels in the Action section of the Preferences or via the Font and Text Direction submenu in the right-click menu of the search term boxes on the Action panel. You can select a different text layout for the Results panel in the Results section of the Preferences or via the Font and Text Direction item in the Results menu. The Editor panel also uses its own text layout, which you can configure in the Editor section of the Preferences or via the Font and Text Direction item in the Editor menu. Finally, you can configure the text layout of the message editor on the user forum in the General section of the Preferences.

Though you can select four different text layouts for different parts of PowerGREP, all four parts offer the same set of preconfigured text layouts. So you can easily make them use the same layout by picking the same preconfigured layout for all of them. You change the preconfigured text layouts via any of the Configure Text Layout buttons in the preferences or the Configure Text Layout item at the bottom of the Font and Text Direction menu items. When you do this the following screen appears.

Text Layout Configuration

Select The Text Layout Configuration That You Want to Use

The Text Layout Configuration screen shows the details of the text layout configuration that you select in the list in the top left corner. Any changes you make on the screen are automatically applied to the selected layout and persist as you choose different layouts in the list. The changes become permanent when you click OK. The layout that is selected in the list when you click OK becomes the new default layout.

Click the New and Delete buttons to add or remove layouts. You must have at least one text layout configuration. If you have more than one, you can use the Up and Down buttons to change their order. The order does not affect anything other than the order in which the text layouts configurations appear in selection lists.

PowerGREP comes with a number of preconfigured text layouts. If you find the options on this screen bewildering, simply choose the preconfigured layout that matches your needs, and ignore all the other settings. You can fully edit and delete all the preconfigured text layouts if you don't like them.

Selected Text Layout Configuration

The section in the upper right corner provides a box to type in the name of the text layout configuration. This name is only used to help you identify it in selection lists when you have prepared more than one text layout configuration.

In the Example box you can type in some text to see how the selected text layout configuration causes the editor to behave.

Text Layout and Direction

Text Cursor Movement

Selection of Words

Character Sequences to Treat as words

Text Cursor Appearance

Select a predefined cursor or click the Configure button to show the text cursor configuration screen. There you can configure the looks of the blinking text cursor (and even make it stop blinking).

A text layout uses two cursors. One cursor is used for insert mode, where typing in text pushes ahead the text after the cursor. The other cursor is used for overwrite mode, where tying in text replaces the characters after the cursor. Pressing the Insert key on the keyboard toggles between insert and overwrite mode.

Main Font

Select the font that you want to use from the drop-down list. Turn on "allow bitmapped fonts" to include bitmapped fonts in the list. Otherwise, only TrueType and OpenType fonts are included. Using a TrueType or OpenType font is recommended. Bitmapped fonts may not be displayed perfectly (e.g. italics may be clipped) and only support a few specific sizes.

If you access the text layout configuration screen from a print preview, then turning on "allow bitmapped fonts" will include printer fonts rather than screen fonts in the list, in addition to the TrueType and OpenType fonts that work everywhere. A "printer font" is a font built into your printer's hardware. If you select a printer font, set "text layout and direction" to "left to right only" for best results.

Fallback Fonts

Not all fonts are capable of displaying text in all scripts or languages. If you have selected one of the complex script options in the "text layout and direction" list, you can specify one or more "fallback" fonts. If the main font does not support a particular script, PowerGREP will try to use one of the fallback fonts. It starts with the topmost font at the list and continues to attempt fonts lower in the list until it finds a font that supports the script you are typing with. If none of the fonts supports the script, then the text will appear as squares.

To figure out which scripts a particular font supports, first type or paste some text using those scripts into the Example box. Make sure one of the complex script options is selected. Then remove all fallback fonts. Now you can change the main font and see which characters that font can display. When you've come up with a list of fonts that, if used together, can display all of your characters, select your preferred font as the main font. Then add all the others as fallback fonts.

Line and Character Spacing

By default all the spacing options are set to zero. This tells PowerGREP to use the default spacing for the font you have selected.

If you find that lines are spaced apart too widely, specify a negative value for "increase (or decrease) the line height". Set to "add 0 pixels of extra space between lines".

If you find that lines are spaced too closely together, specify a positive value for "increase (or decrease) the line height" and/or "add ... pixels of extra space between lines". The difference between the two is that when you select a line of text, increasing the line height increases the height of the selection highlighting, while adding extra space between lines does not. If you select multiple lines of text, extra space between lines shows up as gaps between the selected lines. Adding extra space between lines may make it easier to distinguish between lines.

The "increase (or decrease) the character width by ... pixels" setting is only used when you select "monospaced left-to-right" only in the "text layout and direction" list. You can specify a positive value to increase the character or column width, or a negative value to decrease it. This can be useful if your chosen font is not perfectly monospaced and because of that characters appear spaced too widely or too closely.