Formatting Text

Text in text objects can be formatted. This section covers changing the font, style, size, orientation, justification, and inter-line spacing. Positioning of individual characters (e.g., kerning) is discussed in the following section. Specifying the fill (color, pattern, etc.) of text is covered in Chapter 10, Attributes.

There are three methods to format text. The first is to use the items in the Text Tool-Tool Controls, the second is to use keyboard shortcuts, and the third is to use the Text and Font dialog.

Formatting with the Tool Controls

The font family, font size, justification, font style, and text direction can be changed from the Text Tool-Tool Controls. If characters within a text object are selected, the changes apply only to those characters. Otherwise, the changes apply to all selected text objects (to select more than one text object, switch temporarily to the Select Tool). Changes made when no text object is selected (or a new blank text object is created) change the default style.

Font Family:  The leftmost drop-down menu allows one to select the font family. When activated, the menu shows samples of the various fonts available to Inkscape. (The text used for the sample can be customized by editing your preferences.xml file.) New in v0.47: Use Alt+X to access the menu directly. Once accessed, Alt+Down arrow will open the drop-down list, Up arrow and Down arrow move up and down the list as does using the scroll wheel, and Enter sets the family. Typing into the font entry box will open a list of all fonts that start with the characters typed.

Font Size:  The adjacent drop-down menu sets the font size in pixels. To select a size that is not in the menu, simply type the number in. The mouse scroll wheel can also be used to select the size when the cursor is over the menu (doesn't always work: Bug).

Justification:  Text can be justified by clicking on the following icons:

  • icon Left justified.

  • icon Centered.

  • icon Right justified.

  • icon Left and right justified.

Left, center, and right justified text.
Left, center, right, and both left and right justified text.

Only flowed text can be both left and right justified at the same time.

Style:  Text can made Bold or Italicized (if the chosen font supports these options). These are the styles supported by the SVG standard.

Orientation:  The orientation of the text can be chosen by clicking on one of the following icons:

  • icon Horizontal.

  • icon Vertical.

Horizontal, vertical, and rotated text.
Horizontal (left), vertical (center), and rotated (right) text.

The vertical choice is mostly applicable to languages written from top to bottom and from right to left, such as Chinese, Japanese, or Korean. See the above figure to see the difference between vertical text and text rotated by 90 degrees. A block of text can only have one orientation.

Formatting with the Keyboard

Font style, interline spacing, and inter-character spacing for a line of text are changeable via the keyboard.

Text attributes: Applies to selected text.

  • Ctrl+B: Toggle Bold on/off. Text must be selected.

  • Ctrl+I: Toggle Italics on/off. Text must be selected.

Letter spacing: Commands apply to line with cursor or selection for regular text and applies to paragraph for flowed text. The adjustments are specified in Screen pixels and thus depend on the zoom level.

  • Alt+>: Expand line or paragraph by one Screen pixel.

  • Alt+<: Contract line or paragraph by one Screen pixel.

  • Shift+Alt+>: Expand line or paragraph by ten Screen pixels.

  • Shift+Alt+<: Contract line or paragraph by ten Screen pixels.

Line spacing: Commands apply to entire text object. The adjustments are specified in Screen pixels and thus depend on the zoom level.

  • Ctrl+Alt+>: Make text object one Screen pixel taller.

  • Ctrl+Alt+<: Make text object one Screen pixel shorter.

  • Shift+Ctrl+Alt+>: Make text object ten Screen pixels taller.

  • Shift+Ctrl+Alt+<: Make text object ten Screen pixels shorter.

Formatting with the Text and Font Dialog

Font family, style, and size; justification and line spacing can be changed via the Text and Font dialog (Text icon Text and Font... (Shift+Ctrl+T)). Changing line spacing is only accessible from the dialog. The dialog is split into three parts, the first for selecting the Font Family, the second for selecting the Style and Size, and the third for selecting the Layout. A preview of the proposed changes is shown on the dialog. Changes are not made to the selected text until the Apply button is clicked. Changes apply to the whole text object unless a portion of the text is selected in which case only the selected text is affected. New text can be forced to use a specified format by setting the default with the Set as Default button.

Text and Font dialog.
Text and Font dialog.

Font Family:  The names of all the Font Families installed on your computer should be shown. Click on the name to select a new Font Family.

Style and Font Size:  After a Font Family is selected, the Style box will show the available styles for that family. Not all families have all styles. Oblique is often used instead of Italics.[13]

The Font Size can be selected from the drop-down menu. Font size is measured in pixels. A font size that is not listed can be typed into the Entry box. If you choose a large font, the preview window may not be large enough to show the entire text. In this case, the preview window can be made larger by increasing the size of the dialog window.

Layout:  The alignment and orientation of text can be changed by clicking on the appropriate icon. See the previous section on using Tool Controls for more details on the use of the justification and orientation options.

Text can be:

  • icon Left justified.

  • icon Centered.

  • icon Right justified.

  • icon Left and right justified.

The orientation of the text can be:

  • icon Horizontal.

  • icon Vertical.

Line spacing (the distance between text baselines) can be changed by the Line spacing entry box.

[13] An Oblique font is usually a regular font that has been skewed. A true Italic font has several characters (e.g., a and a) that have different designs.