Skip to content

Most visited

Recently visited

navigation

Paint.FontMetrics

public static class Paint.FontMetrics
extends Object

java.lang.Object
   ↳ android.graphics.Paint.FontMetrics


Class that describes the various metrics for a font at a given text size. Remember, Y values increase going down, so those values will be positive, and values that measure distances going up will be negative. This class is returned by getFontMetrics().

Summary

Fields

public float ascent

The recommended distance above the baseline for singled spaced text.

public float bottom

The maximum distance below the baseline for the lowest glyph in the font at a given text size.

public float descent

The recommended distance below the baseline for singled spaced text.

public float leading

The recommended additional space to add between lines of text.

public float top

The maximum distance above the baseline for the tallest glyph in the font at a given text size.

Public constructors

Paint.FontMetrics()

Inherited methods

From class java.lang.Object

Fields

ascent

Added in API level 1
float ascent

The recommended distance above the baseline for singled spaced text.

bottom

Added in API level 1
float bottom

The maximum distance below the baseline for the lowest glyph in the font at a given text size.

descent

Added in API level 1
float descent

The recommended distance below the baseline for singled spaced text.

leading

Added in API level 1
float leading

The recommended additional space to add between lines of text.

top

Added in API level 1
float top

The maximum distance above the baseline for the tallest glyph in the font at a given text size.

Public constructors

Paint.FontMetrics

Added in API level 1
Paint.FontMetrics ()

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.