Package ch.bailu.gtk.pango
Klasse FontMap
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.pango.FontMap
- Alle implementierten Schnittstellen:
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.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
addFontFile
(Str filename) Loads a font file with one or more fonts into the `PangoFontMap`.boolean
addFontFile
(String filename) Loads a font file with one or more fonts into the `PangoFontMap`.Implements 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.reloadFont
(Font font, double scale, Context context, Str variations) Returns a new font that is like @font, except that its size
is multiplied by @scale, its backend-dependent configuration
(e.g. cairo font options) is replaced by the one in @context,
and its variations are replaced by @variations.reloadFont
(Font font, double scale, Context context, String variations) Returns a new font that is like @font, except that its size
is multiplied by @scale, its backend-dependent configuration
(e.g. cairo font options) is replaced by the one in @context,
and its variations are replaced by @variations.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden 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
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
FontMap
-
-
Methodendetails
-
getClassHandler
-
addFontFile
Loads a font file with one or more fonts into the `PangoFontMap`.
The added fonts will take precedence over preexisting
fonts with the same name.- Parameter:
filename
- Path to the font file- Gibt zurück:
- True if the font file is successfully loaded into the fontmap, false if an error occurred.
- Löst aus:
AllocationError
-
addFontFile
Loads a font file with one or more fonts into the `PangoFontMap`.
The added fonts will take precedence over preexisting
fonts with the same name.- Parameter:
filename
- Path to the font file- Gibt zurück:
- True if the font file is successfully loaded into the fontmap, false if an error occurred.
- Löst aus:
AllocationError
-
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.- Gibt zurück:
- the newly allocated `PangoContext`, which should be freed with g_object_unref().
-
getFamily
Gets a font family by name.- Parameter:
name
- a family name- Gibt zurück:
- the `PangoFontFamily`
-
getFamily
Gets a font family by name.- Parameter:
name
- a family name- Gibt zurück:
- 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`.- Gibt zurück:
- The current serial number of @fontmap.
-
loadFont
Load the font in the fontmap that is the closest match for @desc.- Parameter:
context
- the `PangoContext` the font will be used withdesc
- a `PangoFontDescription` describing the font to load- Gibt zurück:
- 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.- Parameter:
context
- the `PangoContext` the font will be used withdesc
- a `PangoFontDescription` describing the font to loadlanguage
- a `PangoLanguage` the fonts will be used for- Gibt zurück:
- the newly allocated `PangoFontset` loaded, or %NULL if no font matched.
-
reloadFont
public Font reloadFont(@Nonnull Font font, double scale, @Nullable Context context, @Nullable Str variations) Returns a new font that is like @font, except that its size
is multiplied by @scale, its backend-dependent configuration
(e.g. cairo font options) is replaced by the one in @context,
and its variations are replaced by @variations.- Parameter:
font
- a font in @fontmapscale
- the scale factor to applycontext
- a `PangoContext`variations
- font variations to use- Gibt zurück:
- the modified font
-
reloadFont
public Font reloadFont(@Nonnull Font font, double scale, @Nullable Context context, String variations) Returns a new font that is like @font, except that its size
is multiplied by @scale, its backend-dependent configuration
(e.g. cairo font options) is replaced by the one in @context,
and its variations are replaced by @variations.- Parameter:
font
- a font in @fontmapscale
- the scale factor to applycontext
- a `PangoContext`variations
- font variations to use- Gibt zurück:
- the modified font
-
asListModel
Implements interfaceListModel
. Call this to get access to interface functions.- Gibt zurück:
ListModel
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-