Package ch.bailu.gtk.pango
Klasse FontMetrics
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.pango.FontMetrics
- Alle implementierten Schnittstellen:
PointerInterface
A `PangoFontMetrics` structure holds the overall metric information
for a font.
The information in a `PangoFontMetrics` structure may be restricted
to a script. The fields of this structure are private to implementations
of a font backend. See the documentation of the corresponding getters
for documentation of their meaning.
For an overview of the most important metrics, see:
<picture>
<source srcset="fontmetrics-dark.png" media="(prefers-color-scheme: dark)">
<img alt="Font metrics" src="fontmetrics-light.png">
</picture>
for a font.
The information in a `PangoFontMetrics` structure may be restricted
to a script. The fields of this structure are private to implementations
of a font backend. See the documentation of the corresponding getters
for documentation of their meaning.
For an overview of the most important metrics, see:
<picture>
<source srcset="fontmetrics-dark.png" media="(prefers-color-scheme: dark)">
<img alt="Font metrics" src="fontmetrics-light.png">
</picture>
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
Gets the approximate character width for a font metrics structure.int
Gets the approximate digit width for a font metrics structure.int
Gets the ascent from a font metrics structure.static ClassHandler
int
Gets the descent from a font metrics structure.int
int
int
int
int
int
int
int
int
int
int
Gets the line height from a font metrics structure.static int
static long
static TypeSystem.TypeSize
int
Gets the suggested position to draw the strikethrough.int
Gets the suggested thickness to draw for the strikethrough.static long
static TypeSystem.TypeSize
int
Gets the suggested position to draw the underline.int
Gets the suggested thickness to draw for the underline.ref()
Increase the reference count of a font metrics structure by one.void
unref()
Decrease the reference count of a font metrics structure by one.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
-
Felddetails
-
REF_COUNT
- Siehe auch:
-
ASCENT
- Siehe auch:
-
DESCENT
- Siehe auch:
-
HEIGHT
- Siehe auch:
-
APPROXIMATE_CHAR_WIDTH
- Siehe auch:
-
APPROXIMATE_DIGIT_WIDTH
- Siehe auch:
-
UNDERLINE_POSITION
- Siehe auch:
-
UNDERLINE_THICKNESS
- Siehe auch:
-
STRIKETHROUGH_POSITION
- Siehe auch:
-
STRIKETHROUGH_THICKNESS
- Siehe auch:
-
-
Konstruktordetails
-
FontMetrics
-
FontMetrics
public FontMetrics()
-
-
Methodendetails
-
getClassHandler
-
getFieldRefCount
public int getFieldRefCount() -
getFieldAscent
public int getFieldAscent() -
getFieldDescent
public int getFieldDescent() -
getFieldHeight
public int getFieldHeight() -
getFieldApproximateCharWidth
public int getFieldApproximateCharWidth() -
getFieldApproximateDigitWidth
public int getFieldApproximateDigitWidth() -
getFieldUnderlinePosition
public int getFieldUnderlinePosition() -
getFieldUnderlineThickness
public int getFieldUnderlineThickness() -
getFieldStrikethroughPosition
public int getFieldStrikethroughPosition() -
getFieldStrikethroughThickness
public int getFieldStrikethroughThickness() -
getApproximateCharWidth
public int getApproximateCharWidth()Gets the approximate character width for a font metrics structure.
This is merely a representative value useful, for example, for
determining the initial size for a window. Actual characters in
text will be wider and narrower than this.- Gibt zurück:
- the character width, in Pango units.
-
getApproximateDigitWidth
public int getApproximateDigitWidth()Gets the approximate digit width for a font metrics structure.
This is merely a representative value useful, for example, for
determining the initial size for a window. Actual digits in
text can be wider or narrower than this, though this value
is generally somewhat more accurate than the result of
pango_font_metrics_get_approximate_char_width() for digits.- Gibt zurück:
- the digit width, in Pango units.
-
getAscent
public int getAscent()Gets the ascent from a font metrics structure.
The ascent is the distance from the baseline to the logical top
of a line of text. (The logical top may be above or below the top
of the actual drawn ink. It is necessary to lay out the text to
figure where the ink will be.)- Gibt zurück:
- the ascent, in Pango units.
-
getDescent
public int getDescent()Gets the descent from a font metrics structure.
The descent is the distance from the baseline to the logical bottom
of a line of text. (The logical bottom may be above or below the
bottom of the actual drawn ink. It is necessary to lay out the text
to figure where the ink will be.)- Gibt zurück:
- the descent, in Pango units.
-
getHeight
public int getHeight()Gets the line height from a font metrics structure.
The line height is the recommended distance between successive
baselines in wrapped text using this font.
If the line height is not available, 0 is returned.- Gibt zurück:
- the height, in Pango units
-
getStrikethroughPosition
public int getStrikethroughPosition()Gets the suggested position to draw the strikethrough.
The value returned is the distance *above* the
baseline of the top of the strikethrough.- Gibt zurück:
- the suggested strikethrough position, in Pango units.
-
getStrikethroughThickness
public int getStrikethroughThickness()Gets the suggested thickness to draw for the strikethrough.- Gibt zurück:
- the suggested strikethrough thickness, in Pango units.
-
getUnderlinePosition
public int getUnderlinePosition()Gets the suggested position to draw the underline.
The value returned is the distance *above* the baseline of the top
of the underline. Since most fonts have underline positions beneath
the baseline, this value is typically negative.- Gibt zurück:
- the suggested underline position, in Pango units.
-
getUnderlineThickness
public int getUnderlineThickness()Gets the suggested thickness to draw for the underline.- Gibt zurück:
- the suggested underline thickness, in Pango units.
-
ref
Increase the reference count of a font metrics structure by one.- Gibt zurück:
- @metrics
-
unref
public void unref()Decrease the reference count of a font metrics structure by one.
If the result is zero, frees the structure and any associated memory. -
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-