Package ch.bailu.gtk.pango
Class FontMap
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.pango.FontMap
- All Implemented Interfaces:
PointerInterface
A `PangoFontMap` represents the set of fonts available for a
particular rendering system.
This is a virtual object with implementations being specific to
particular rendering systems.
particular rendering system.
This is a virtual object with implementations being specific to
particular rendering systems.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionImplements interfaceListModel
.void
changed()
Forces a change in the context, which will cause any `PangoContext`
using this fontmap to change.Creates a `PangoContext` connected to @fontmap.static ClassHandler
Gets a font family by name.Gets a font family by name.static int
static long
static TypeSystem.TypeSize
int
Returns the current serial number of @fontmap.static long
static TypeSystem.TypeSize
loadFont
(Context context, FontDescription desc) Load the font in the fontmap that is the closest match for @desc.loadFontset
(Context context, FontDescription desc, Language language) Load a set of fonts in the fontmap that can be used to render
a font matching @desc.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
FontMap
-
-
Method Details
-
getClassHandler
-
changed
public void changed()Forces a change in the context, which will cause any `PangoContext`
using this fontmap to change.
This function is only useful when implementing a new backend
for Pango, something applications won't do. Backends should
call this function if they have attached extra data to the
context and such data is changed. -
createContext
Creates a `PangoContext` connected to @fontmap.
This is equivalent to [ctor@Pango.Context.new] followed by
[method@Pango.Context.set_font_map].
If you are using Pango as part of a higher-level system,
that system may have it's own way of create a `PangoContext`.
For instance, the GTK toolkit has, among others,
gtk_widget_get_pango_context(). Use those instead.- Returns:
- the newly allocated `PangoContext`, which should be freed with g_object_unref().
-
getFamily
Gets a font family by name.- Parameters:
name
- a family name- Returns:
- the `PangoFontFamily`
-
getFamily
Gets a font family by name.- Parameters:
name
- a family name- Returns:
- the `PangoFontFamily`
-
getSerial
public int getSerial()Returns the current serial number of @fontmap.
The serial number is initialized to an small number larger than zero
when a new fontmap is created and is increased whenever the fontmap
is changed. It may wrap, but will never have the value 0. Since it can
wrap, never compare it with "less than", always use "not equals".
The fontmap can only be changed using backend-specific API, like changing
fontmap resolution.
This can be used to automatically detect changes to a `PangoFontMap`,
like in `PangoContext`.- Returns:
- The current serial number of @fontmap.
-
loadFont
Load the font in the fontmap that is the closest match for @desc.- Parameters:
context
- the `PangoContext` the font will be used withdesc
- a `PangoFontDescription` describing the font to load- Returns:
- the newly allocated `PangoFont` loaded, or %NULL if no font matched.
-
loadFontset
public Fontset loadFontset(@Nonnull Context context, @Nonnull FontDescription desc, @Nonnull Language language) Load a set of fonts in the fontmap that can be used to render
a font matching @desc.- Parameters:
context
- the `PangoContext` the font will be used withdesc
- a `PangoFontDescription` describing the font to loadlanguage
- a `PangoLanguage` the fonts will be used for- Returns:
- the newly allocated `PangoFontset` loaded, or %NULL if no font matched.
-
asListModel
Implements interfaceListModel
. Call this to get access to interface functions.- Returns:
ListModel
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-