org.gnome.pango

## Class Context

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.pango.Context

-     public class Context
      extends Object

  The internal state used by Pango when rendering.

  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 `Widget.Draw` signal handler:

       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.Context` name when you call Layout's `getContext()`.

  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.

  Since:
    4.0.10

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Font` | `loadFont(FontDescription desc)` Given a description, ask the back end to load the font which is the closest match to the request.
    `void` | `setFontOptions(FontOptions options)` Set the configuration options that will be used by Cairo when doing the actual rendering of font glyphs.

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### loadFont

          public Font loadFont(FontDescription desc)

      Given a description, ask the back end to load the font which is the closest match to the request.

      This is the code path used by `Layout`, so you can use this find out what font has actually been selected for rendering.

      Since:
        4.0.19

    - #### setFontOptions

          public void setFontOptions(FontOptions options)

      Set the configuration options that will be used by Cairo when doing the actual rendering of font glyphs. This is how you control things like which hinting methods being used.
      Since:
        4.0.10