org.gnu.pango

Class Context


public class Context
extends GObject

The PangoContext structure stores global information used to control the itemization process. It contains the following fields:

Field Summary

Fields inherited from class org.gnu.glib.GObject

eventsInitialized

Constructor Summary

Context(Handle handle)
Create a new Context passing a handle that was created in the native layer.

Method Summary

Direction
getBaseDir()
Retrieves the base direction for the context.
FontDescription
getFontDescription()
Retrieve the default font description for the context.
Language
getLanguage()
Retrieves the global language tag for the context.
FontMetrics
getMetrics(FontDescription desc, Language language)
Get overall metric information for a font particular font description.
FontFamily[]
listFamilies()
List all families for a Context.
FontDescription
loadFont(FontDescription desc)
Loads the font in one of the fontmaps in the context that is the closest match for desc.
protected static int
pango_context_get_base_dir(Handle context)
protected static Handle
pango_context_get_font_description(Handle context)
protected static Handle
pango_context_get_language(Handle context)
protected static Handle
pango_context_get_metrics(Handle context, Handle desc, Handle language)
protected static int
pango_context_get_type()
protected static Handle[]
pango_context_list_families(Handle context)
protected static Handle
pango_context_load_font(Handle context, Handle desc)
protected static boolean
pango_context_load_fontNULL(Handle handle, Handle desc)
protected static void
pango_context_set_base_dir(Handle context, int direction)
protected static void
pango_context_set_font_description(Handle context, Handle desc)
protected static void
pango_context_set_language(Handle context, Handle language)
void
setBaseDir(Direction dir)
Sets the base direction for the context.
void
setFontDescription(FontDescription desc)
Sets the font description
void
setLanguage(Language lang)
Sets the language

Methods inherited from class org.gnu.glib.GObject

addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, equals, freezeNotify, getBooleanProperty, getData, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getHandle, getIntFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getNullHandle, getPixbufProperty, getProperty, getStringFromHandle, getStringProperty, hasProperty, hashCode, instantiateJGObjectFromGType, notify, removeEventHandler, removeListener, retrieveGObject, setBooleanProperty, setData, setData, setDoubleProperty, setFloatProperty, setHandle, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify

Constructor Details

Context

public Context(Handle handle)
Create a new Context passing a handle that was created in the native layer.

Parameters:
handle - The handle to a native resource.

Method Details

getBaseDir

public Direction getBaseDir()
Retrieves the base direction for the context.


getFontDescription

public FontDescription getFontDescription()
Retrieve the default font description for the context.

Returns:
default font description.


getLanguage

public Language getLanguage()
Retrieves the global language tag for the context.


getMetrics

public FontMetrics getMetrics(FontDescription desc,
                              Language language)
Get overall metric information for a font particular font description. Since the metrics may be substantially different for different scripts, a language tag can be provided to indicate that the metrics should be retrieved that correspond to the script(s) used by that language.

The PangoFontDescription is interpreted in the same way as by pango_itemize(), and the family name may be a comma separated list of figures. If characters from multiple of these families would be used to render the string, then the returned fonts would be a composite of the metrics for the fonts loaded for the individual families.


listFamilies

public FontFamily[] listFamilies()
List all families for a Context.


loadFont

public FontDescription loadFont(FontDescription desc)
Loads the font in one of the fontmaps in the context that is the closest match for desc.

Parameters:
desc - A FontDescription describing the font to load

Returns:
The font loaded, or null if no font matched.


pango_context_get_base_dir

protected static final int pango_context_get_base_dir(Handle context)


pango_context_get_font_description

protected static final Handle pango_context_get_font_description(Handle context)


pango_context_get_language

protected static final Handle pango_context_get_language(Handle context)


pango_context_get_metrics

protected static final Handle pango_context_get_metrics(Handle context,
                                                        Handle desc,
                                                        Handle language)


pango_context_get_type

protected static final int pango_context_get_type()


pango_context_list_families

protected static final Handle[] pango_context_list_families(Handle context)


pango_context_load_font

protected static final Handle pango_context_load_font(Handle context,
                                                      Handle desc)


pango_context_load_fontNULL

protected static final boolean pango_context_load_fontNULL(Handle handle,
                                                           Handle desc)


pango_context_set_base_dir

protected static final void pango_context_set_base_dir(Handle context,
                                                       int direction)


pango_context_set_font_description

protected static final void pango_context_set_font_description(Handle context,
                                                               Handle desc)


pango_context_set_language

protected static final void pango_context_set_language(Handle context,
                                                       Handle language)


setBaseDir

public void setBaseDir(Direction dir)
Sets the base direction for the context.


setFontDescription

public void setFontDescription(FontDescription desc)
Sets the font description


setLanguage

public void setLanguage(Language lang)
Sets the language