Frequently Asked Questions about Sketch
=======================================

  1 About Sketch
  1.1 What is Sketch?
  1.2 Why would I want to use Sketch? I have GIMP!
  1.3 Where can I find out more about Sketch?
  1.4 Which Platforms does Sketch work on?

  2 Troubleshooting
  2.1 I get the error message "Can't import the Python Imaging Library"
  2.2 The window resizes every time I drag the mouse

  3 Using Sketch
  3.1 How do I import a PostScript or EPS file?
  3.2 How do I export a drawing as EPS?
  3.3 How do I close a curve or polygon?

  4 Miscellaneous
  4.1 Why doesn't Sketch have support for <some cool feature>?
  4.2 Which font formats are supported?
  4.3 Why doesn't Sketch support TrueType fonts?
  4.4 Can I input text in ISO-Latin-2 or some other encoding?


1 About Sketch
==============

1.1 What is Sketch?
-------------------

Sketch is an interactive vector drawing program for Linux and other
UNIX compatible systems. Sketch is implemented almost completely in
Python, a very high-level, object oriented, interpreted language, with
the rest written in C for speed.

1.2 Why would I want to use Sketch? I have GIMP!
------------------------------------------------

Sketch is a vector drawing program. That means a Sketch drawing is made
up of shapes like rectangles, ellipses and curves that can be filled
and stroked. Each object is represented by the mathematical description
of its shape, e.g. for a circle they're the coordinates of the center
point and the length of the radius. Because of this, vector drawings
can be scaled without quality loss and it's very easy to change parts
of a drawing.

GIMP, on the other hand, is an image manipulation program. A GIMP image
is made up of thousands of pixels and apart from layers has no inner
structure. This representation has the advantage that you can easily
have a lot of fine detail because each pixel can have a different
color, but after you e.g. have drawn a line, all you have is pixels.
You can't easily change the position or length or color of the line
after you've drawn it. Furthermore, a raster image is always designed
with one particular resolution in mind and scaling it often reduces its
quality.

Both kinds of graphics programs have their strengths and weaknesses and
for some purposes an image manipulation program is the appropriate tool
while for others it's the vector drawing program and often you'll need
both.

1.3 Where can I find out more about Sketch?
-------------------------------------------

The best place to go for information about Sketch is its web-page at
URL:http://sketch.sourceforge.net/.

1.4 Which Platforms does Sketch work on?
----------------------------------------

The feedback I've got so far about other platforms indicates that
Sketch runs on these platforms too:

  - Linux on i386, Alpha, m68k, PowerPC and Sparc

  - FreeBSD

  - Solaris 2.5.1, 2.6

  - IRIX64 6.4

  - AIX


2 Troubleshooting
=================

2.1 I get the error message "Can't import the Python Imaging Library"
---------------------------------------------------------------------

This message usually means that the Python Imaging Library (PIL) is not
installed on your system, so the solution is to install it.

URLs for the sources and rpms can be found on Sketch's web-page (see
FAQ 1.3) and in the INSTALL file. Some Linux distributions already
contain a suitable version of PIL although in some cases they're a bit
buggy.

SuSE Linux 6.2, 6.3 and 6.4, for instance, have a PIL-package, but it's
slightly broken. The file /usr/lib/python1.5/site-packages/PIL.pth is
missing. To fix this, create that file with just the line 'PIL' in it
(without the quotes). (the purpose and syntax of *.pth files is
described in /usr/lib/python1.5/site.py)

2.2 The window resizes every time I drag the mouse
--------------------------------------------------

The frequent resizes are caused by the changing texts in the status
bar. The best solution is to either use the "--geometry" command line
option to set the size of the main window or to put an entry like
"sketch.geometry: 900x680" into your .Xdefaults file.


3 Using Sketch
==============

3.1 How do I import a PostScript or EPS file?
---------------------------------------------

That depends on what you want to do exactly.

If you want to embed an EPS file as a whole into a Sketch drawing, just
treat it like a raster image, i.e. use the menu command
Edit->Create->Load Image file or use the corresponding toolbar button
which is the rightmost one.

In this case, you get an EPS-object which Sketch displays with a
preview image rendered by ghostscript. It behaves very much like a
raster image, but when you output your drawing as a postscript file,
the EPS' postscript code is copied to the output file.

If you want to import your postscript file because you want to edit its
contents, to change fill colors for example, you can in some
circumstances use the normal file loading commands, i.e. File->Open or
File->Insert Document, to achieve this. It only works if the file is
actually an Illustrator file.

For other postscript files, have a look at pstoedit
(URL:http://www.geocities.com/SiliconValley/Network/1958/pstoedit/). It
uses ghostscript to interpret arbitrary postscript files and can write
several vector file formats, including Sketch's own sk-format.

3.2 How do I export a drawing as EPS?
-------------------------------------

Just print into a file or use File->Save as PostScript in the menu.
Sketch always generates EPS files. You don't have to do anything
special.

3.3 How do I close a curve or polygon?
--------------------------------------

In edit mode, select both end points and invoke the menu command
Curve->Close Nodes.


4 Miscellaneous
===============

4.1 Why doesn't Sketch have support for <some cool feature>?
------------------------------------------------------------

Depending on what the feature in question is, there are several
possible answers.

The most common reason is simply that nobody has written it yet. There
are many useful features that Sketch should have, but currently there's
only one Programmer writing code and that severely limits what gets
implemented and how fast.

Of course, not every feature is useful or fits well with the goals of
the Sketch project. However, I hope to make Sketch flexible and
extensible enough to accommodate such features with plugins and user
scripts.

See also the FAQs about TrueType fonts (4.3) and text encodings (4.4)

4.2 Which font formats are supported?
-------------------------------------

Currently, Sketch supports only Type 1 fonts.

4.3 Why doesn't Sketch support TrueType fonts?
----------------------------------------------

Well, font-handling under Linux/Unix/X is pretty complex. Applications
have to do a lot of things themselves that should be provided by the
'system' (whatever that means). So it's simply a lot of work and I went
the easy route and support only Type1 fonts because X can render them
even without any special setup and printing them is no problem because
it's the native PostScript font format.

Now, with FreeType and XFree 4.0, supporting TrueType fonts will become
much easier and Sketch will support them one day.

4.4 Can I input text in ISO-Latin-2 or some other encoding?
-----------------------------------------------------------

Unfortunately, no. At least not in the 0.6 stable releases.

Adding proper support for that would require a lot more work than I
want to do for 0.6.x. It would require changes to the way events are
handled, text objects would have to know about encodings and the
post-script output code as well, and it would require changes to the
file format.

That having been said, one of the goals of the current developer
series, 0.7, is better text support including better support for
encodings other than ISO-Latin-1. One of the first steps will probably
be to switch to unicode internally.

When I added text support to Sketch, I simply chose the most simple way
to handle encodings that would suffice for my needs and that's Latin-1
and some support for font-specific encodings for symbol fonts. I knew
of course that this wouldn't be enough in the long run, especially with
respect to non-latin scripts and multi-byte character sets, but having
a simple implementation that works for many users is always better than
to have no usable code because the project gets bogged down in a too
complex design, IMO, especially in an open source project.
