1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>4.12. Text and Fonts</title>
<link rel="stylesheet" href="gimp-help-plain.css" type="text/css" />
<link rel="stylesheet" href="gimp-help-screen.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1" />
<link rel="start" href="index.html" title=" " />
<link rel="up" href="ch02s04.html" title="4. Working with Images" />
<link rel="prev" href="ch02s04s11.html" title="4.11. Palettes" />
<link rel="next" href="ch02s04s13.html" title="4.13. Stroking a Selection or Path" />
</head>
<body>
<div xmlns="" class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center" id="chaptername">4.12. Text and Fonts</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="ch02s04s11.html">Prev</a> </td>
<th width="60%" align="center" id="sectionname">4.12. Text and Fonts</th>
<td width="20%" align="right"> <a accesskey="n" href="ch02s04s13.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="gimp-text"></a>4.12. Text and Fonts</h3>
</div>
</div>
</div>
<a id="id3312472" class="indexterm"></a>
<div class="informalfigure">
<div class="mediaobject">
<img src="../images/using/text-example.png" />
<div class="caption">
<p>
Example of a text item, showing the boundary of the text
layer. (Font: Utopia Bold)
</p>
</div>
</div>
</div>
<p>
One of the greatest improvements of GIMP 2.0 over GIMP 1.2 is in
the handling of text. In GIMP 2.0 and 2.2, each text item goes in a
separate Text layer, and you can come back later to the layer and
edit the text in it. You can also move the text around in the
image, or change the font, or the font size. You can use any
font available on your system. You can control justification,
indentation, and line spacing.
</p>
<p>
Actually, you can operate on a text layer in the same ways as any
other layer, but doing so often means giving up the ability to
edit the text without losing the results of your work.
</p>
<p>
To understand some of the idiosyncracies of text handling, it may
help for you to realize that a text layer contains more
information than the pixel data that you see: it also contains a
representation of the text in a text-editor format. You can see
this in the text-editor window that pops up while you are using the
Text tool. Every time you alter the text, the image layer is
redrawn to reflect your changes.
</p>
<p>
Now suppose you create a text layer, and then operate on it in
some way that does not involve the Text tool: rotate it, for
example. Suppose you then come back and try to edit it using the
Text tool. As soon as you edit the text, the Text tool will
redraw the layer, wiping out the results of the operations you
performed in the meantime.
</p>
<p>
Because this danger is not obvious, the Text tool tries to protect
you from it. If you operate on a text layer, and then later try
to edit the text, a message pops up, warning you that your
alterations will be undone, and giving you three options: (1)
edit the text anyway; (2) cancel; (3) create a new text layer with
the same text as the existing layer, leaving the existing layer
unchanged.
</p>
<div class="simplesect" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3312549"></a>Embellishing Text</h4>
</div>
</div>
</div>
<div class="informalfigure">
<div class="mediaobject">
<img src="../images/using/logo-examples.png" />
<div class="caption">
<p>
Four fancy text items created using logo scripts: "alien
neon", "bovination", "frosty", and "chalk". Default
settings were used for everything except font size.
</p>
</div>
</div>
</div>
<p>
There are many things you can do to vary the appearance of text
beyond just rendering it with different fonts or different
colors. By converting a text item to a selection or a path, you
can fill it, stroke the outlines, transform it, or generallly
apply the whole panoply of GIMP tools to get interesting
effects. As a demonstration of some of the possibilities, try
out the "logo" scripts in the Toolbox menu, at
<span class="guimenu">Xtns</span>-><span class="guisubmenu">Script-Fu</span>-><span class="guisubmenu">Logos</span>.
Each of these scripts allows you to enter some text, and then
creates a new image showing a logo constructed out of that text.
If you would like to modify one of these scripts, or construct
a logo script of your own, the <a href="ch02s09.html" title="9. Using Script-Fu Scripts">Using Script-Fu</a> and <a href="ch02s10.html" title="10. A Script-Fu Tutorial">Script-Fu
Tutorial</a> sections should help you get started. Of
course, you don't need Script-Fu to create these sorts of
effects, only to automate them.
</p>
</div>
<div class="simplesect" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="gimp-fonts"></a>Adding Fonts</h4>
</div>
</div>
</div>
<p>
For the most authoritative and up-to-date information on fonts
in GIMP, consult the <a href="http://gimp.org/unix/fonts.html" target="_top">Fonts in GIMP 2.0</a>
page at the GIMP web site. This section attempts to give you a
helpful overview.
</p>
<p>
GIMP uses the FreeType 2 font engine to render fonts, and a
system called Fontconfig to manage them. GIMP will let you use
any font in Fontconfig's font path; it will also let you use any
font it finds in GIMP's font search path, which is set on the
<a href="ch04s18s16.html" title="18.16. Data Folders">Font Folders</a> page
of the Preferences dialog. By default, the font search path
includes a system GIMP-fonts folder (which you should not alter,
even though it is actually empty), and a
<tt class="filename">fonts</tt> folder inside your personal GIMP
directory. You can add new folders to the font search path if
it is more convenient for you.
</p>
<p>
FreeType 2 is a very powerful and flexible system. By default,
it supports the following font file formats:
</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>
TrueType fonts (and collections)
</p>
</li>
<li>
<p>
Type 1 fonts
</p>
</li>
<li>
<p>
CID-keyed Type 1 fonts
</p>
</li>
<li>
<p>
CFF fonts
</p>
</li>
<li>
<p>
OpenType fonts (both TrueType and CFF variants)
</p>
</li>
<li>
<p>
SFNT-based bitmap fonts
</p>
</li>
<li>
<p>
X11 PCF fonts
</p>
</li>
<li>
<p>
Windows FNT fonts
</p>
</li>
<li>
<p>
BDF fonts (including anti-aliased ones)
</p>
</li>
<li>
<p>
PFR fonts
</p>
</li>
<li>
<p>
Type42 fonts (limited support)
</p>
</li>
</ul>
</div>
<p>
You can also add modules to support other types of font files.
See <a href="http://www.freetype.org/freetype2/index.html#features" target="_top">FREETYPE
2</a> for more information.
</p>
<p><b>Linux. </b>
On a Linux system, if the Fontconfig utility is set up as usual,
all you need to do to add a new font is to place the file in the
directory <tt class="filename">~/.fonts</tt>. This will make the font
available not only to GIMP, but to any other program that uses
Fontconfig. If for some reason you want the font to be available
to GIMP only, you can place it in the <tt class="filename">fonts</tt>
subdirectory of your personal GIMP directory, or some other
location in your font search path. Doing either will cause the
font to show up the next time you start GIMP. If you want to use
it in an already running GIMP, press the
<span class="emphasis"><em>Refresh</em></span> button in the <a href="ch04s14.html" title="14. Fonts dialog">Fonts dialog</a>.
</p>
<p><b>Windows. </b>
The easiest way to install a font is to drag the file onto the
Fonts directory and let the shell do its magic. Unless you've done
something creative, it's probably in its default location of
<tt class="filename">C:\windows\fonts</tt> or
<tt class="filename">C:\winnt\fonts</tt>. Sometimes double-clicking on
a font will install it as well as display it; sometimes it only
displays it. This method will make the font available not only to
GIMP, but also to other Windows applications.
</p>
<p>
To install a Type 1 file, you need both the
<tt class="filename">.pfb</tt> and <tt class="filename">.pfm</tt>
files. Drag the one that gets an icon into the fonts folder.
The other one doesn't strictly need to be in the same directory
when you drag the file, since it uses some kind of search
algorithm to find it if it's not, but in any case putting it in
the same directory does no harm.
</p>
<p>
In principle, GIMP can use any type of font on Windows that
FreeType can handle; however, for fonts that Windows can't
handle natively, you should install them by placing the font
files in the <tt class="filename">fonts</tt> folder of your personal
GIMP directory, or some other location in your font search
path. The support Windows has varies by version. All that
GIMP runs on support at least TrueType, Windows FON, and Windows
FNT. Windows 2000 and later support Type 1 and OpenType.
Windows ME supports OpenType and possibly Type 1 (but the most
widely used Windows GIMP installer does not officially support
Windows ME, although it may work anyway).
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25">
<img alt="[Note]" src="../images/note.png" />
</td>
<th align="left">Note</th>
</tr>
<tr>
<td colspan="2" align="left" valign="top">
<p>
GIMP uses Fontconfig to manage fonts on Windows as well as Linux.
The instructions above work because Fontconfig by default uses the
Windows fonts directory, i. e., the same fonts that Windows uses
itself. If for some reason your Fontconfig is set up differently,
you will have to figure out where to put fonts so that GIMP can
find them: in any case, the <tt class="filename">fonts</tt> folder of
your personal GIMP directory should work.
</p>
</td>
</tr>
</table>
</div>
</div>
<div class="simplesect" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3313461"></a>Font Problems</h4>
</div>
</div>
</div>
<p>
Problems with fonts have probably been responsible for more GIMP
2 bug reports than any other single cause, although they have
become much less frequent in the most recent releases in the 2.0
series. In most cases they have been caused by malformed font
files giving trouble to Fontconfig. If you experience crashes
at startup when GIMP scans your font directories, the best
solution is to upgrade to a version of Fontconfig newer than
2.2.0. As a quick workaround you can start gimp with the
<tt class="filename">--no-fonts</tt> command-line option, but then
you will not be able to use the text tool.
</p>
<p>
Another known problem is that Pango 1.2 cannot load fonts that
don't provide an Unicode character mapping. (Pango is the text
layout library used by GIMP.) A lot of symbol fonts fall into
this category. On some systems, using such a font
can cause GIMP to crash. Updating to Pango 1.4 will fix this
problem and makes symbol fonts available in GIMP.
</p>
<p>
A frequent source of confusion occurs on Windows systems, when
GIMP encounters a malformed font file and generates an error
message: this causes a console window to pop up so that you can
see the message. <span class="emphasis"><em>Do not close that console window.
It is harmless, and closing it will shut down GIMP.</em></span>
When this happens, it often seems to users that GIMP has
crashed. It hasn't: closing the console window causes Windows
to shut GIMP down. Unfortunately, this annoying situation is
caused by an interaction between Windows and the libraries
that GIMP links to: it cannot be fixed within GIMP. All you
need to do, though, if this happens, is minimize the console
window and ignore it.
</p>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="ch02s04s11.html">Prev</a> </td>
<td width="20%" align="center">
<a accesskey="u" href="ch02s04.html">Up</a>
</td>
<td width="40%" align="right"> <a accesskey="n" href="ch02s04s13.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">4.11. Palettes </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> 4.13. Stroking a Selection or Path</td>
</tr>
</table>
</div>
</body>
</html>
|