This document tries to answer the Frequently Asked Questions about jfig: However, it is outdated by now. Please also check the FAQ section in the jfig tutorial. ----------- Q: What is in this FAQ? A: Contents: o What is jfig? What is xfig? o jfig status? o jfig installation, CLASSPATH settings o I can't get it running o jfig and the JRE o version information o documentation o license o FIG format and compatibility o import and export filters o object selection o object rotation o font problems o layer manager o known bugs in jfig o reporting new errors o bindkeys o customization (fonts, etc.) o look and feel o integrating jfig in your application o running on a notebook (800x600) o running a jfig presentation o building a jfig presentation -------- Q: What is xfig? What is jfig? A: xfig is a popular 2D-graphics and diagram editor for the X-windows (X11) system. It is available on most Unix and Linux systems, and can also be made to run on Windows (using a rather complex setup). Check www.xfig.org for documentation and the latest version of xfig. xfig supports all common drawing objects like boxes, polylines with arrows, arcs, bezier splines, text objects, and embedded images. xfig uses its own text-based file format, called FIG. A companion program transfig/fig2dev provides export filters to several popular file formats like Postscript. Additional functions, including TeX font support, make xfig the editor of choice to create graphics for TeX/LaTeX documents. The user interface of xfig is mode-oriented and can be used very efficiently. However, the user interface concept differs from most Windows-based graphics editors and requires some practice to get used to. jfig is a Java-based clone of xfig. It uses a very similar user interface, includes the same edit operations, and reads and writes FIG files. Unlike xfig, jfig should run on all Java compatible platforms - including PCs/notebooks under Windows 9x/NT/2000/XP. jfig can also be used as a class library to embed 2D graphics and diagrams into other Java applications. For example, the "jfig simple applet" allows to include and display FIG files in web pages. The jfig presentation viewer and corresponding presentation builder allow to construct slide shows from a set of individual FIG files. For details and the latest version of jfig check the jfig homepage, tams-www.informatik.uni-hamburg.de/applets/jfig/ -------- Q: What is the current status of jfig? A: Status (jfig 3.0x / jfig 2.0x / jfig 1.6x): There are currently three versions of jfig, which use the same core classes, but differ in the user-interface. jfig 3.xx is the current version, based on Swing and Java2D, JDK/JRE 1.4.2 or higher required. Thre previous version, jfig 2.xx was also based on Swing and Java2D, but uses another internal architecture than jfig 3. It can be made to run under JDK 1.3.x or higher, and possibly even with a Java 1.1 generation VM in combination with swing-1.1.1. jfig 1.6x provides the older, AWT-based version of jfig. It should work with JDK 1.1.x, 1.3.x, 1.4.x, Kaffe, and the Microsoft VM. xfig 3.1 xfig 3.2 jfig 1.53+ FIG formats 2.1 + + + 3.1 + + + 3.2 - + + object types rectangle (also round corners) + + + polyline, polygon + + + circle, ellipse + + + arc + + + (B) spline + - + interpolated spline + - + X-spline - + + text + + + embedded image + + + group (compound) + + + user-defined objects - - + object attributes line and fill colors + + + line style (solid, dash, ...) + + + arrow (forward, backward, styles) + + + fill patters + + + (0) rotated text + + + (0) rotated ellipse + + + image formats PNG - + + GIF, JPEG, XBM + + + XPM, PPM + + * (1) Postscript + + - (1) text fonts LaTeX fonts + + - (2) 31 Postscript fonts + + + (2) Math, Symbol fonts + + + other TrueType fonts - - + (3) edit operations create object + + + move, copy + + + delete, delete region + + + edit attributes + + + (4) update attributes (with mask) + + + scale object + + + rotate (cw/ccw) + + + mirror x/y (flip) + + + move/add/delete point on polyline + + + align objects in compound + + + smart-links move - + + convert polyline <-> spline + + + create / destroy compound (group) + + + open compound (temporarily) - + + add library object - + + 1-level undo + + + recursive undo - - + layer manager - + + (r) clipboard copy/cut/insert + + + import text file - - + snap object to magnetic grid - - + attribute cache - - + spell check - + - canvas with grid and zoom + + + magnetic grid + + + negative coordinates allowed - + + Manhattan / LaTeX geometry + + + antialiasing - + + (0) high-quality image display (zoomed) - - + (0) bindkeys / accelerators + + + uses three-button mouse + + + print + (5) + (5) + (6) export via transfig/fig2dev + + + PDF export via itEXT - - + (r) screen shot - + + quick browsing via PAGE_UP/DOWN - - + Notes: (B) format problem: jfig uses FIG 3.2.3c spec, which changed in FIG 3.2.3d (0) requires Java2D: only partially rendered with Java 1.1 (1) depends on the installed Java import filters (2) if font installed on the system, otherwise rendered with similar font. When TrueType versions of the TeX/LaTeX computer modern fonts are installed, you can also use substitution to use these fonts. (3) see font installation in this FAQ (4) Java "nested dialog" problem, see below for an explanation (5) Postscript only (6) all printers on your system / low quality with Java 1.1 (r) requires registration of jfig -------- Q: jfig installation, CLASSPATH settings A: See the README file for latest information about jfig installation. JDK/JRE 1.4 and above: In general, jfig looks best with a Java2D compatible Java virtual machine, like JDK/JRE 1.4 from Sun Microsystems, www.javasoft.com. Variants of the JDK from other vendors like IBM should work, too. If you have JDK/JRE 1.4 correctly installed on your system, you can directly run JAR-archives without any further installation. From a shell, just run java -jar /path/to/jfig3.jar [filename.fig] java -jar c:\path\to\jfig3.jar [filename.fig] where the filename argument is optional. (Substitute the actual path to your jfig3.jar file in the above command lines). On Windows, you can also double-click on the "jfig3.jar" icon in the explorer. You may want to drop a link from jfig3.jar to your desktop or the Windows start menu. Microsoft jview: To run jfig with the Microsoft (Internet Explorer) VM, open a MSDOS command shell, and type jview /cp c:\path\to\jfig.jar jfig.gui.Editor [filename.fig] JDK/JRE 1.1.8 You will need to set your CLASSPATH variable. See the README file for details. However, there are not many good reasons left to use such an old version of the JDK. NOTE: running jfig2 under JDK/JRE 1.1.8 or the Microsoft VM: To run jfig2, you will also need the "swingall.jar" archive from the Swing-1.1.1 release, available for download from www.javasoft.com. Then, include jfig2.jar and swingall.jar in your classpath, and run "java jfig.gui.JModularEditor". For example, jview /cp c:\tmp\jfig2.jar;c:\tmp\swingall.jar jfig.gui.JModularEditor -------- Q: I can't get it running! A: If you really can't get jfig running, please try the following: 1. Check that you have a Java 1.4 compatible Java virtual machine (or higher). Try to run "java -version" and check the output. 2. Try to run another Java program. If this doesn't work either, probably your Java installation is broken. 3. Check that you have an intact class archive "jfi3.jar". Try to list the archive contents with WinZIP, unzip, or JAR. This should show several hundred files in subdirectories "jfig/canvas, jfig/commands, jfig/doc, jfig/gui, jfig/objects and jfig/utils. If you can't read the contents of the jfig class archive file, try to download it again (make sure to use binary transfer mode). 4. Ask your local Java guru for help. 5. Submit a detailed bug report (see below). -------- Q: Can I use jfig in combination with the JRE? A: No problem. Read the preceding paragraph for general information about jfig and the required CLASSPATH settings. Recent versions of the JRE (1.4+) should work without problem, using the same commands as described above for the JDK. -------- Q: What version of jfig have I got? A: Start jfig and select the "Help->About" menu item. This should display a dialog window with general information about jfig and with the software version. Check the jfig homepage on http://tams-www.informatik.uni-hamburg.de/applets/jfig/ for upgrades and the latest version. -------- Q: Where do I find documentation about jfig or xfig? A: Select the "Help->documentation" menu item. This opens a dialog window with pointers to online documentation about jfig, xfig, the FIG file format, and the transfig/fig2dev programs. -------- Q: What are the licensing terms for jfig? A: Select the "Help->LICENSE..." menu item. This shows a dialog window with the current version of the jfig license. -------- Q: What are the known bugs in jfig? A: The following list is unsorted. Please study all entries before submitting a new bug report. For a list of recent changes and updates to jfig, see the "jfig/doc/CHANGES" file in the jfig.jar archive or on the jfig homepage. o jfig does NOT use the same ordering as xfig for rendering objects on the same layer (depth). Indeed, it even reverses this ordering during some operations (like opening a compound) for performance reasons. This means that the appearance of drawings with overlapping objects on the same layer is essentially undefined and may very. Please correct your drawings to avoid such problems. Just update overlapping objects to use different layers. o Rendering of advanced attributes (like rotated texts, antialiased text, fill patterns, dash-dotted lines) requires the Java2D library. On systems without Java2D, jfig will still maintain and manage those attributes, but it cannot display them correctly. o Not all of the embedded image formats from xfig are supported. As jfig directly uses the Java image import filters, the list of supported image formats depends on your Java virtual machine, and the list of optionally installed Java packages. At least the XBM, GIF, and JPEG formats should be supported on all platforms. Newer JDKs also offer PNG support. Unfortunately, embedded Postscript files cannot be displayed. Please inform me about any new image filters for Java, especially for TIFF and EPS/PS format. o Object selection is a little restrictive, especially for stacked objects. For details, see the section on "object selection" below. o Filled arc objects are not always rendered correctly (because jfig always uses the pie-wedge style). However, note that several versions of xfig also have problems with arc objects. For example, my xfig 3.2.3c writes incorrect object data and crashes when reading-back its own files, if those files have filled open-arc objects... It is not clear whether jfig should support the FIG specification or the (incorrect) implementation of xfig 3.2.3 "Normal" arc objects should work with arrows and all line-styles. Minor and Cosmetic bugs: o rubberbanding is not correct for rotated ellipse objects. o Multi-line text objects (i.e. strings with '\n' chars) are not supported. o "Flipped" images are not supported. Workaround: flip the image in an external image manipulation program. Java-related bugs: o Keyboard-input suffers from many Java virtual machine bugs, especially in combination with non-US keyboards. The current version of jfig contains a number of workarounds to get the most important keys working, but you may still encounter problems. For example, versions of the Sun JDK for Windows ignore key-pressed events on the 'DEL' key, while versions of IBMs JDK for Linux crash when pressing the ALT-GR (=META) key on German keyboards, etc. o Fonts may have to be substituted by (similar) fonts available on your system. See the font questions and answers below. -------- Q: I just found another bug in jfig. How shall I report it? A: Please check first whether the bug is already described in the "known bugs" section of this FAQ list. If it is, complain without detailed error-messages to "hendrich@informatik.uni-hamburg.de" - so that I know which bugs/features are really annoying to users. If the bug is new, please send an email with the bug-report to "hendrich@informatik.uni-hamburg.de" and include all of the following information: 1. General description of the bug 2. System and version information: 2a. jfig version used 2b. Host system (Operation system, Java virtual machine, memory, etc.), e.g. Windows XP SP2, JDK 5.0, 640 MByte main memory, true color (24bit) display 2c. Are you running jfig as a standalone application or from inside a browser. If the latter, which browser? 2d. If you suspect a configuration problem, please include all of the "jfig.cnf" or ".jfigrc" configuration files from your jfig installation, your home directory and working directory. 3. Please include an example FIG file that allows to reproduce the error. -------- Q: I cannot create polylines or splines! Setting the initial points works, but when I try to create the next line, the previous line disappears! A: Creating polylines (or polygons, or splines) is really quite simple. Select "create polyline" mode (or "create polygon" etc). Click the left mouse button on the first point of the polyline. Next, click the left mouse button on each intermediate point. Finally, click the *MIDDLE* button on the final point of the polyline to create and finish the object. Clicking the right mouse button will cancel the operation and delete the (so far unfinished) polyline. If your mouse does not have a middle button, or the middle button is configured for some fixed purpose (or simply awkward to press, as is typical for wheel-mouses), you can configure jfig to use other input combinations as a substitue for the middle mouse button click. Typically, you can use either or both of the following: (1) holding down the shift key while clicking the left button (2) double click on the left button. See the explanations in the /jfig/doc/mouse-buttons.txt file for details. From the editor, select menu->help->mouse buttons. -------- Q: I cannot add arrowheads on polylines! A: To activate arrowheads on polylines, you would first select an arrow type (plain arrow, open triangle, filled triangle, etc). Next, select the arrow mode (none, forward arrow, backward arrow, both) in the corresponding GUI button (which lies left to the arrow type button). -------- Q: When I try to select an object's attribute from the Edit Object dialog (e.g. EditPolyline dialog), the select value dialog appears, but it seems to be dead? A: Hmm, yes. This is the "nested dialog" window problem mentioned above in the "known bugs" section. This is not a bug in jfig, but a platform-dependent bug in the Java windowing toolkit. Add or change the following setup- manager property to false: jfig.gui.Editor.ModalEditDialogs false With this setting, the editor creates the "edit object" dialogs as non-modal dialogs, which should make the nested "select value" dialogs useable. However, as the "edit object" dialogs are no longer modal, you can open multiple dialogs and you can even select other jfig commands while the "edit object" dialogs are still open. Warning: Using non-modal dialogs can lead to unexpected behaviour, for example, if you open an "edit object" dialog for some object, then use the "delete" command to delete that object, and finally select "apply" in the "edit object" dialog, the deleted object will reappear... Needless to say, the undo and redo operations may have problems in such situations, too. Note that you can also use the middle and right mouse-buttons on the individual attribute controls in an "edit object" dialog to decrease or increase the corresponding attribute value. -------- Q: The preview option is missing from the "Open File" dialog? A: Yes. There is an alternative, however. Currently, jfig always uses the standard file dialog windows provided by the Java virtual machine. While it would be possible to write a customized dialog with a "preview" feature similar to xfig 3.2+, this means a lot of work, another non-standard GUI control, and (potentially) many new bugs. However, the time required to generate a preview is essentially the same time that is required to actually open the file. Therefore, it is often at least as fast to use the jfig "open next file" feature. Just open one of the files in the target directory, click in the object canvas (to request the keyboard focus), and then press the PAGE_UP (or PAGE_DOWN) keys to open the next (previous) file in that directory. This allows you to browse very quickly through your files -- and the file is already open in the editor, should you want to modify it. -------- Q: Object selection does not work for some objects? A: Mostly, it should work, but unfortunately, sometimes it does not. The editor tries its best to find the object nearest to the mouse position during edit commands, but sometimes the algorithm fails, especially in complex situations with overlapping objects: o Note that most operations in jfig/xfig require that you select an object by clicking on its "control points". For example, to move a polygon you may have to click on a polygon vertex, while clicking inside the polygon has no effect. o If you receive messages like "please click directly on " during operations like move-point, try to change the magnetic grid settings (window->magnetic grid->value) or try to click also a little to the left/right/top/bottom of the target vertex. o Also, with layered objects, sometimes the wrong object is found first. As a workaround, move the "annoying object" away, edit the target object, move the annnying object back. o Object selection of overlapping or abutted objects can be a mess. If you have to select a rectangle (box), compound, or circle object from multiple abutting objects, it might be better to click slightliy to the inside of the object instead of a vertex. For example, with two abutting rectangles "1" and "2", click on position x to select "1" and position y to select "2": 111112222 1 x2y 2 1 1 2 111122222 However, it still may be necessary to move some objects out of the way if the above trick fails. -------- Q: Why can't I rotate objects? A: Object rotation works. However, you have probably used the default rotation angle, which is 0 (zero) degrees. Just select a non-null rotation angle in the "rotation angle" control button in the attribute panel. Either use the middle or right mouse buttons to step through the set of predefined values, or click the button and enter the rotation angle value numerically. Also note that images cannot be rotated and that rectangles can only be rotated by multiples of 90 degrees. While jfig always stores the object rotation angle internally, it requires a Java 2 compatible virtual machine (e.g. JDK/JRE 1.3) in order to render rotated text and ellipse objects to the screen. On JDK 1.1.x and the Microsoft virtual machine, texts and ellipses will be displayed unrotated. Finally, rubberbanding for rotated ellipses is broken (and will not be fixed soon, unless somebody else volunteers to do it). Just select the "corner" points for the rotated ellipse as usual. The created ellipse will be displayed correctly. -------- Q: It seems that jfig doesn't use the fonts I selected? Q: My xfig files look bad in jfig because the fonts are too big and extend into other objects! Why is that? A: This is due to restrictions in the Java graphics API and several Java bugs. Also, the status of font rendering has changed greatly with each new version of Java. Finally, the required fonts are not installed on all systems. Therefore, the answer on your question depends on the Java virtual machine and the font installation on your system. First, note that jfig always stores and maintains all font attributes internally, even when the font cannot be displayed correctly. Therefore, you can open existing FIG files in jfig without fear that attributes will be lost. If jfig detects that it cannot display a selected font (e.g. Bookman-DemiItalic), it will substitute another and (and hopefully similar) font. Java 1.1 / jview: With a Java 1.1 virtual machine (e.g. JDK 1.1.8 or Microsoft Jview), an application can only use a fixed set of basic fonts for rendering. This set includes Times, Helvetica, Courier with bold and italic variants. Therefore, jfig maps the fonts used in your drawings to the "best match" of the available fonts. The mapping is compiled into jfig and cannot be changed. Also, a Java 1.1 virtual machine cannot render rotated text objects. In this case, jfig will store the text rotation angle, but it will render the text without rotation. When loading a FIG file with rotated texts on a Java 1.1 VM, jfig will print a corresponding warning message. Java 2 (JDK 1.2, JDK 1.3, JDK 1.4): Since JDK 1.2, Java font rendering has improved greatly, with TrueType font support, font antialiasing, and arbitrary coordinate transformations. However, all current virtual machines up to JDK 1.4 still have severe bugs in the font rendering. On Windows systems, TrueType fonts are the default for rendering, and the JVM can access and use all installed TrueType fonts. However, not all fonts used by xfig are installed on a typical Windows system. Therefore, the default setting for jfig is *not* to use other fonts than (Times, Helvetica/Arial, Courier). You can change that behaviour via a set of properties, one for each FIG Postscript font, in the .jfigrc (jfig.cnf) configuration file. Just uncomment and edit the property for each additional font that you have. The property key is the Postscript font name, and the property value (the right String on each line) should be the name of an available TrueType font and the font shape, for example "Verdana,plain". A typical entry in your .jfigrc file might look like this: jfig.gui.FontCache.AvantGarde-BookOblique ItcAvantGardeGothic,italic jfig.gui.FontCache.Times-Roman Verdana,plain ... Via this mapping, you can also use additional symbol fonts. For example, I have used the following setting to access the Cubase.ttf font with musical notes and symbols from jfig: jfig.gui.FontCache.Helvetica-Oblique Cubase,plain On Windows systems, and possibly on Macintosh systems, uncommenting and setting the properties should be enough to get the right fonts. On Unix (Linux, Solaris) systems, the situation is even less user-friendly, because the JVM uses a special directory to look for fonts. Please consult the release notes and documentation for your specific VM (e.g. IBM JDK 1.3 or Blackdown JDK 1.3 for Linux). It may be necessary to copy existing TrueType fonts to the special JVM font directory, and it may even be necessary to rebuild the fonts.dir information (which is too complex to be covered here). LaTeX-fonts are currently not supported by jfig. However, you can download and install TrueType versions of the TeX/LaTeX computer modern family and fonts, and you can use these fonts as the substitution fonts for the normal Postscript fonts. For example, assuming you have a ComputerModernSansSerif.ttf file that has the TrueType font information for cmss: jfig.gui.FontCache.Helvetica ComputerModernSansSerif,plain -------- Q: What is the font configuration dialog and how do I use it? A: The font configuration dialog in jfig2 allows you to interactively select the font mapping of the Postscript fonts specified by the FIG format to the actual TrueType fonts avaiable on your system. Note that you do not need to use the dialog as long as you are content with the default font mapping. The main reason to re-configure the jfig font mapping is that the TrueType fonts used by JDK1.3+ on Unix platforms are much wider than the Postscript fonts, which means that text objects need too much space. For example, text objects may extend beyond a box... To open the dialog window from the jfig editor, just select the menu->options->font configuration menu item (which is disabled in the non-registered versions of jfig), and wait a few seconds until jfig has enumerated all fonts available on your system. In the dialog window, you will see one row per FIG font, with the (Postscript) font name on the left, a combo box to select the font mapping for that font, and a label which measures the width ratio of the selected vs. the original font. To select a font, click the combo box object and scroll through the list of available fonts until you find a font that looks similar to the original font. Naturally, you can also try to select a font that has approximately the right width. For example, the default fonts used by the JDK on Linux are 20..40 percent wider that the original fonts; while using the URW fonts gives a length mismatch of only a few percent. Select the mapping for all fonts, or just the fonts that you use in your FIG drawings. (Note that scrolling through the list of available fonts with the cursor keys may be much faster than scrolling with the mouse.) Pressing "Cancel" closes the dialog and any settings you may have changed are ignored. Press "Apply" to apply your settings to jfig. However, you must reload the current drawing before the new settings take effect. WARNING: While the editor uses your new mapping after an "Apply", the changes are not yet saved and will be lost if you exit the jfig editor. To save the mapping, open the properties viewer dialog via menu->options->Show properties, and select the "Save as /.jfigrc" command in that dialog. NOTE: You may have to re-run the font configuration dialog again if you install or remove TrueType fonts from your system, or if you install another version of the JDK. NOTE: The font configuration dialog is not yet extensively tested. Please report any bugs or problems you may experience. -------- Q: Are there bindkeys (shortcut keys) for frequently used commands? A: Yes. First, check the jfig main menu bar for the menu shortcuts. These typically use combinations of +key or ++key. The menu shortcuts are managed by the Java virtual machine and cannot be changed. Second, jfig supports the following additional and simple bindkeys for most frequent editing commands. These allow for very fast editing by selecting a command with the bindkey with the left hand while keeping the right hand on the mouse. Note that the default bindkeys are mostly but not fully xfig- compatible, because Java does not support CTRL-key combinations reliably. The following list is sorted by the command button panel layout: 'e' 'c' create an Ellipse, create a Circle 'S' 's' create a closed Spline, create a spline 'I' 'i' create a closed Bezier spline, create a bezier spline 'p', 'l' create a closed Polygon, create a polyline 'b', create a Rectangle (box), 'r' create an Arc 'J', 't' create an Image, create a Text 'g' 'G' create a Compound object, break a Compound, 'o', open a Compound temporarily, 'M', 'm' move an object's point, move an object, 'a', 'C' insert a point, copy an object, 'D', 'd' cut a point, delete an object, 'u', 'E' update object attributes, edit an object, 'F', 'f' mirror object along x, mirror object y, 'Z', 'z' zoom in, zoom out. Naturally, the bindkeys are disabled during editing of text objects. ---------- Q: Can I customize the appearance and functionality of jfig? A: Yes. On startup, the both the jfig editor and viewer will search for and parse three configuration files in the following order: 1) a global configuration file "/jfig/jfig.cnf", packed into the original "jfig3.jar" class archive. Depending on your installation, a "/jfig/jfig.cnf" may also be found on your CLASSPATH. 2) a user configuration file called ".jfigrc" in the user home directory (i.e. ~/.jfigrc on Unix). 3) a local configuration file ".jfigrc" in the current working directory ( "./.jfigrc" on Unix). Edit the properties in either of this files to customize the behavior of jfig. Note that you can overwrite global settings with user settings, and these in turn with local settings. ---------- Q: Can I make jfig look like my other (native) applications? A: When using jfig 1.x, it should already look more or less like your native applications, as well as the underlying Java VM supports this. However, there is no way to change the appearance. For jfig 3.x, the appearance of the user interface can be changed via the so-called "look and feel" mechanism. The default appearance uses the platform independent "Metal" or "Swing" look and feel, which I personally prefer. You can change this via a property in the jfig startup configuration file, namely: jfig.LookAndFeelClassName javax.swing.plaf.metal.MetalLookAndFeel jfig.LookAndFeelClassName com.sun.java.swing.plaf.windows.WindowsLookAndFeel jfig.LookAndFeelClassName com.sun.java.swing.plaf.motif.MotifLookAndFeel jfig.LookAndFeelClassName javax.swing.plaf.mac.MacLookAndFeel It is also possible to change the appearance via the corresponding command line parameter, e.g. (type everything on one line): java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel jfig.gui.JModularEditor or java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel jfig.gui.JModularEditor The Windows look and feel can be selected on Windows machines only; on Windows-XP machines it can also use the newer XP look. ---------- Q: Can I integrate jfig with my own killer application? A: In principle, this is very easy for both the editor and the viewer. The current version of jfig uses a modular architecture, and you can easily add new commands and even new object types. Unfortunately, there is no user documentation about this (yet). Please read the "embedding jfig" notes in /jfig/doc/embedding.txt, also available via the jfig "help" menu; and check out the example source files inside the main jfig3.jar archive file. ---------- Q: How to run jfig on a notebook at 800x600 pixels? A: Depending on your OS and JVM version, the size of the Java GUI components may vary slightly. Usually, jfig should be useable with a display resolution of at least 800x600 pixels. While the "zoom" buttons may be off-screen, this is not a major problem. You may want to disable the Windows taskbar ("automatically in background") or move the taskbar to the left/right of the screen. You may also want to set the jfig.gui.Editor.AttribsScrollPaneEnable property to true, to get access to all attribute controls for the "update" operation. This feature is disabled by default, because it needs additional screen area (and doesn't look as good, IMO). ---------- Q: What do you mean by "Unicode" support? A: Java promises to provide Unicode characters on all supported platforms. Currently, Unicode is used in the Java language, all Java class libraries and also jfig. Additionally, jfig uses "\uxxxx" escapes in its files to store unicode characters. This is _not_ FIG 3.1/FIG 3.2 compatible, but it should allow to exchange jfig and xfig files without problems. Whether the unicode characters will be displayed correctly, depends on your platform and configuration. On most Unix systems, the greek and some math characters will be displayed correctly, but Cyrillic or Arabic characters will not. On Windows, you can install "Font packs" to get more or less complete Unicode fonts and support. ---------- Q: Exporting via fig2dev does not work? A: Most xfig/jfig users want to export their drawings to Postscript or PDF format, to include them with TeX/LaTeX or Word documents. The easiest way to convert a drawing to Postscript format is to install a Postscript printer and to print the drawing to a file. Select "menu->file->print (java native)" to print the drawing in the current zoom factor and translation. Due to severe bugs in the Java printing API, this may or may not work. Also, on Java 1.1 not all object attributes are supported and render quality is low. The second way is to use the xfig companion program "fig2dev", which also supports many output formats beside Postscript. However, fig2dev is not available in a Java implementation. Therefore, you have to install the fig2dev program and to set up an interface between jfig and fig2dev. For information about exporting and fig2dev, please read the file "/jfig/doc/export-fig2dev.txt" in the class archive, or select "menu->help->export and fig2dev". Q: When I export or print, embedded images are lost! A: This can happen due to several reasons: (1) Please make sure to use a supported image file format, like GIF, PNG, or JPEG. Embedded Postscript and PDF images are not directly supported by jfig (but can be used together with fig2dev). If jfig renders embedded images on-screen, they should also turn up without problems when using the (a) Java-based print functions, (b) the built-in PDF export, and (c) the built-in image export options. However, if jfig cannot render an embedded image on-screen, it will also fail to render for the above export options. (2) Please make sure that the path (filename) used for the embedded image is correct; if necessary change to edit-object mode, click on the image, then edit filename to match the actual image filename on your computer. Press "apply" and "ok", then reload the image file. (3) If you use relative filenames for embedded images, the full image name is constructed from the current working directory and your relative filenames. Please check that jfig and fig2dev agree on the same working directory: otherwise, fig2dev might fail to find the image files. Workaround 1: change your image filenames to absolute filenames (e.g. "c:\temp\image.png" instead of "image.png"). Workaround 2: start jfig in the correct working directory instead of a default directory. This might be necessary when starting jfig3 via Java Webstart. If in doubt, download jfig3-itext.jar manually from the jfig homepage, copy the JAR file into the same directory as your figure files, then double-click the jar-archive from that directory (or open a shell, change to the figure file directory, and type java -jar jfig3-itext.jar). -------- Q: The layer manager does not work? A: It works, but it is disabled in the un-registered version of jfig. The layer (depth) manager allows to show or hide objects on any given depth which can be a great help when editing complex diagrams. Note that the jfig layer manager does not "look into" compound objects, but uses the outer layer of a compound object only. Just open a compound object and use "reload" in the layer manager to update the layer information from the compound's member objects. Don't hesitate to tell me if you would prefer the layer manager to always respect all object layers - even for objects encapsulated inside compound objects. ---------- Q: Running a jfig presentation A: Usually, a jfig presentation JAR archive includes the jfig viewer software, so the following should work: JDK/JRE 1.3+: java -jar c:\path\to\your\presentation.jar MS jview: jview /cp c:\path\to\your\presentation.jar jfig.gui.PresentationViewer ---------- Q: Building a jfig presentation A: The current jfig3.jar class archive includes several utility applications besides the jfig editor. One of those is the jfig presentation viewer, which allows to combine several FIG files and all embedded images into a "Powerpoint"-style presentation. To build such a presentation, open a command shell and run the following command (assuming jfig3.jar is in your CLASSPATH): java jfig.utils.PresentationBuilder This prints a short help message with all the options. The typical usage is: java jfig.utils.PresentationBuilder -jar where is the filename of the resulting presentation archive, is the directory with all the .fig slides and .jpg, .gif, ... embedded images (if any), is the absolute path to the jfig-presentationviewer.zip of jfig.jar archive, if you want to embed the jfig viewer software within the presentation archive. Because the PresentationBuilder adds the slides ordered by their file names, the order might not be as intended. In this case you would use a three step process to re-order and edit the presentation. 1. First, create an index file with all the slides: java jfig.utils.PresentationBuilder -jpt > tmp.jpt 2. Edit the index file to reorder the slides or omit some: edit tmp.jpt 3. Create a new presentation with the existing index file: java jfig.utils.PresentationBuilder -jar tmp.jpt ----------