6.6. Теkst

Rysunek 14.187. Tekst na pasku narzędzi

Tekst na pasku narzędzi

The Text tool places text into an image. With GIMP-2.8, you can write your text directly on the canvas. No Text Editor is needed anymore (although you can still use it if you want by checking the Use editor option in the Tool Options dialog. A text toolbar has been added which allows you to edit text in different ways but you can still go on using the Text Option dialog, to change the font, color and size of your text, and justify it, interactively. Right clicking on the frame opens a context menu that allows you to copy, cut, paste, load a text...

As soon as you type your text, it appears on the canvas in a rectangular frame. If you draw the rectangular frame first, the text is automatically adapted to the frame size. You can enlarge this frame as you do with rectangular selections.

To move the text on canvas, you have to select the Move tool and click on a character to drag the frame and its text.

6.6.1. Activating the Tool

Narzędzie można aktywować na kilka sposobów:

  • In the image menu through ToolsText,

  • by clicking the tool icon in Toolbox,

  • przy pomocy skrótu klawiszowego T.

6.6.2. Options

Rysunek 14.188. Opcje Теkstu

Opcje „Теkstu”

Normally, tool options are displayed in a window attached under the Toolbox as soon as you activate a tool. If they are not, you can access them from the image menu bar through WindowsDockable WindowsTool Options which opens the option window of the selected tool.

Czcionka

Click on the fonts button to open the font selector of this tool, which offers you a list of installed X fonts.

At the bottom of the font selector you find some icons which act as buttons for:

  • resizing the font previews,

  • selecting list view or grid view,

  • opening the font dialog.

Choose a font from the installed fonts. When you select a font it is interactively applied to your text.

[Podpowiedź] Podpowiedź

You can use the scroll wheel of your pointing device (usually your mouse) on the fonts button in order to quickly change the font of your text (move the pointer on the fonts button, and don't click, just use the wheel button).

Rozmiar

Оkreśla rozmiar czcionki dla dowolnej jednostki miary.

Use editor

Use an external editor window for text editing instead of direct-on-canvas editing.

Wygładzaj

Wygładzanie pokazuje tekst z bardziej miękkim konturem. Jest to możliwe dzięki lekkiemu rozmywaniu granic. Opcja ta może o wiele ulepszyć widok tekstu. Jeśli modelem koloru nie jest RGB, to wygładzanie należy stosować ostrożnie.

Hinting

Uses the index of adjustment of the font to modify characters in order to produce clear letters in small font sizes.

Kolor

Оkreśla kolor tekstu. Domyślnym kolorem jest czarny. Po kliknięciu pola pojawia się okno wyboru koloru.

[Podpowiedź] Podpowiedź

Można również przeciągnąć kolor z paska narzędzi na tekst.

Justowanie

Wyrównuje tekst zgodnie z wybraną ikoną.

Оdstęp

Controls the indent spacing from the left margin, for the first line.

Odległość między wierszami

Оkreśla odległość pomiędzy sąsiadującymi wersami. Efekt zmiany tej opcji od razu widoczny jest na obrazie. Wartość opcji to nie tylko sama odległość, а liczba pikseli, którą należy dodać lub odjąć od tej odległości. Wartość może być ujemna.

Letter Spacing

Controls the spacing between letters. Also in this case the number is not the space itself between letters, but how many pixels must be added to or subtracted from this space (the value can be negative).

Box

Concerns the text box. The associated drop down list offers two options:

Dynamic: default option. The size of the text box increases as you type. Text may go out of the image. You have to press the Enter key to add a new line. The indent option indents all lines. If you increase the box size, the option turns to "Fixed".

Fixed: you must enlarge the text box first. Else, usual shortcuts are active! The text is limited by the right side of the box and continues on next line. This is not true new line: you must press the Enter key to add a real new line. The text may go out the lower border of the image. The indent option works on the first line only.

6.6.3. The Text tool context menu

You get this menu by right clicking in a text frame with handles.

  • Cut, Copy, Paste, Delete: these options concern a selected text. They remain grayed out as long as no text is selected. Paste is activated if the clipboard is full of text.

  • Open text file: this command opens a file browser where you can find the wanted text file.

  • Clear: this command deletes all the text, selected or not.

  • Path from text: this command creates a path from the outlines of the current text. The result is not evident. You have to open the Path dialog and make path visible. Then select the Path tool and click on the text. Every letter is now surrounded with a path component. So you can modify the shape of letters by moving path control points.

    This command is similar to LayerText to Path.

  • Text along path:

    Opcja jest aktywna tylko, gdy istnieje ścieżka. W tym celu należy stworzyć lub importować ścieżkę, a nastepnie aktywować ją.

    Następnie należy wybrać narzędzie Tekst i wprowadzić tekst. Aby skorzystać z już istniejącego tekstu należy aktywować jego warstwę w oknie warstw, aktywować Tekst i kliknąć na tekst w oknie obrazu.

    Rysunek 14.189. The Text along Path command among text commands in the Layer menu

    The Text along Path command among text commands in the Layer menu

    This group of options appears only if a layer text exists.


    If you want to use a text that already exists, make it active in the Layer dialog, select the Text tool and click on the text in the image window.

    Click on the Text along Path button. The text is bent along the path. Letters are represented with their outline. Each of them is a component of the new path that appears in the Path dialog. All path options should apply to this new path.

    Rysunek 14.190. Przykład Tekstu za ścieżką

    Przykład „Tekstu za ścieżką”
    Przykład „Tekstu za ścieżką”

  • From Left to Right / From Right to Left: fix the writing direction of your language.

6.6.4. Edytor tekstowy

Rysunek 14.191. The Text Editor

The Text Editor

With GIMP-2.8, this text editor is available only if the Use editor option is checked. It persists probably because all its functions are not transferred to the direct-on-canvas mode, for instance the Unicode characters.

Тekst można zmienić w edytorze, а czcionkę w edytorze czcionki.

As soon as you start writing, a Text layer is created in the Layer Dialog. On an image with such a layer (the image you are working on, or a .xcf image), you can resume text editing by activating this text layer then clicking on it (double click). Of course, you can apply to this text layer the same functions you use with other layers.

Aby dodać tekst do obrazu, należy kliknąć nie tekstową warstwę. Pojawi się wtedy nowy edytor i utworzona zostanie nowa warstwa. Aby przejść z jednego tekstu na drugi, należy aktywować odpowiednią warstwę tekstową i kliknąć go. Aktywowany będzie wtedy odpowiedni edytor.

You can get Unicode characters with Ctrl+Shift+U plus hexadecimal Unicode code of the desired char, for example:

Rysunek 14.192. Entering Unicode characters

Entering Unicode characters

Ctrl+Shift+U

Entering Unicode characters

4 7

Entering Unicode characters

Enter


Of course this feature is more useful for entering special (even exotic) characters, provided that the required glyphs for these characters are supplied by the selected font — only few fonts support Klingon. ;-)

Unicode 0x47 (G), 0x2665, 0x0271, 0x03C0

Opcje edytora tekstowego

Load Text from file

Text can be loaded from a text file by clicking the folder icon in the text editor. All the text in the file is loaded.

Clear all text

Wciśnięcie przycisku usuwa tekst z edytora i z obrazu.

From left to right

Opcja ta pozwala wprowadzać tekst od lewej do prawej, jak w większości języków zachodnich i wielu języków wschodnich.

From right to left

Opcja pozwala wprowadzać tekst od prawej do lewej, jak w niektórych językach wschodnich, np. arabskim (pokazany na ikonie).

Use selected font

Default doesn't use the font you have selected in the Options dialog. If you want to use it, check this option.

[Uwaga] Uwaga

Zobacz też Tekst i czcionka.