FIGUE
*Tutorial *Previous *Current *Next

Working with Resources : Portable Font

* Credits and Acknowledgements

The portable fonts used in Figue's Symbol class rely on the anti-aliased fonts for Java, courtesy of Bernard Suffrin, Worcester College.

* Step by Step

Import the usual figue packages.
import figue.*;
import figue.box.*;
import figue.path.*;
Import the resource package.
import figue.resource.*;
Define an initializer.
FacadeInitializer theParameters = new FacadeInitializer();
Add to the initializer the location of the portable font library.
final URL theCodeBaseUrl = getCodeBase();
theParameters.setPortableFontLibrary(
   new URL(theCodeBaseUrl,
           theCodeBaseUrl + ""));
Pass the initializer to the facade on creation.
_facade = new AWTFacade(theParameters);
Create and keep a reference to a portable font.
_portableFont = _facade.doGetPortableFont(null,
                                          "laurass12",
                                          600,
                                          1.5);
Build a symbol.
theLine.addChild(new Symbol(theBuffer.toString(),
                            _portableFont));

* Example

Accelerators :
home, end, page up, page down, left arrow,right arrow, up arrow, down arrow.
Autoscrolling :
drag the mouse inside the text area, approach a border or a corner, and wait.

* The Whole Program

* Related Classes and Methods

* What Next ?

Now you can :

*Tutorial *Previous *Current *Next

Comments or suggestions?
Need some help?
Copyright ©1998 INRIA
Last updated 4 November 1998 by Bruno Conductier
FIGUE