Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Chapter 7.  Using GIMP as an Expert

1.  Text

1.1.  Embellishing Text

Figure 7.1.  Fancy text

Fancy text

Four fancy text items created using logo scripts: “alien neon”, “bovination”, “frosty”, and “chalk”. Default settings were used for everything except font size.

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 Xtns->Script-Fu->Logos. 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 Using Script-Fu and Script-Fu Tutorial sections should help you get started. Of course, you don't need Script-Fu to create these sorts of effects, only to automate them.

1.2.  Adding Fonts

For the most authoritative and up-to-date information on fonts in GIMP, consult the Fonts in GIMP 2.0 page at the GIMP web site. This section attempts to give you a helpful overview.

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 Font Folders 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 fonts folder inside your personal GIMP directory. You can add new folders to the font search path if it is more convenient for you.

FreeType 2 is a very powerful and flexible system. By default, it supports the following font file formats:

  • TrueType fonts (and collections)

  • Type 1 fonts

  • CID-keyed Type 1 fonts

  • CFF fonts

  • OpenType fonts (both TrueType and CFF variants)

  • SFNT-based bitmap fonts

  • X11 PCF fonts

  • Windows FNT fonts

  • BDF fonts (including anti-aliased ones)

  • PFR fonts

  • Type42 fonts (limited support)

You can also add modules to support other types of font files. See FREETYPE 2 for more information.

Linux.  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 ~/.fonts. 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 fonts 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 Refresh button in the Fonts dialog.

Windows.  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 C:\windows\fonts or C:\winnt\fonts. 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.

To install a Type 1 file, you need both the .pfb and .pfm 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.

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 fonts 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).

[Note] Note

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 fonts folder of your personal GIMP directory should work.

1.3.  Font Problems

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 --no-fonts command-line option, but then you will not be able to use the text tool.

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.

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. Do not close that console window. It is harmless, and closing it will shut down GIMP. 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.


 
 
  Published under the terms of the GNU General Public License Design by Interspire