public class Context extends Object
This is one of those cases where we are unfortunate that the class name collides with the same name from another package and you could find yourself using both in the same file. If you're working from a Layout and need to use this, and given theses:
import org.freedesktop.cairo.Context; import org.freedesktop.cairo.FontOptions; import org.gnome.pango.Layout; import org.gnome.gtk.Widget;etc, you might be well off to do something like this in a
final Layout layout; final FontOptions config; layout = new Layout(cr); config = new FontOptions(); ... layout.getContext().setFontOptions(config);which avoids you having to use the fully qualified
org.gnome.pango.Contextname when you call Layout's
You ordinarily do not need to use this, although you might want to know that every time a Pango Layout is created a fresh Pango Context is done up.
|Modifier and Type||Method and Description|
Given a description, ask the back end to load the font which is the closest match to the request.
Set the configuration options that will be used by Cairo when doing the actual rendering of font glyphs.
public Font loadFont(FontDescription desc)
This is the code path used by
Layout, so you can use
this find out what font has actually been selected for rendering.
public void setFontOptions(FontOptions options)