de.dante.extex.language.ligature
Interface LigatureBuilder

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
Language, ManagedLanguage, ModifiableLanguage
All Known Implementing Classes:
BaseHyphenationTable, EmptyLigatureBuilder, FutureLanguage, LigatureBuilderImpl

public interface LigatureBuilder
extends java.io.Serializable

This interface describes the capability of a ligature builder. The ligature builder inserts kerning nodes and constructs ligature nodes. It might use the information from the font.

Version:
$Revision: 1.4 $
Author:
Gerd Neugebauer

Method Summary
 UnicodeChar getLigature(UnicodeChar c1, UnicodeChar c2, Font f)
          Get a single ligature of to characters.
 int insertLigatures(NodeList list, int start)
          Take a node list and transform character sequences into ligatures where appropriate.
 

Method Detail

insertLigatures

public int insertLigatures(NodeList list,
                           int start)
                    throws HyphenationException
Take a node list and transform character sequences into ligatures where appropriate. The processing should extend over all characters with the same font and non-character nodes. It should return the control to the caller as soon as a character node with another font is found.

Parameters:
list - the node list to create ligatures for
start - the index in the list to start processing
Returns:
the index after last node processed
Throws:
HyphenationException - in case of an error

getLigature

public UnicodeChar getLigature(UnicodeChar c1,
                               UnicodeChar c2,
                               Font f)
                        throws HyphenationException
Get a single ligature of to characters.

Parameters:
c1 - the first character
c2 - the second character
f - the current font
Returns:
the ligature of c1 and c2 or null if none exists
Throws:
HyphenationException - in case of an error