Font

actual open class Font
expect open class Font
actual open class Font
actual open class Font
actual open class Font

Holds attributes controlling the style, size and other attributes of earth.worldwind.shape.Label shapes and the textual features of earth.worldwind.shape.Placemark and other shapes. The values used for these attributes are those defined by the CSS Font property.

Constructors

Link copied to clipboard
constructor(size: Float, typeface: Typeface? = null)
actual constructor()
actual constructor(family: String, weight: FontWeight, size: Int)
expect constructor()
expect constructor(family: String, weight: FontWeight, size: Int)
actual constructor()
actual constructor(family: String, weight: FontWeight, size: Int)
constructor(font: Font)
actual constructor()
actual constructor(family: String, weight: FontWeight, size: Int)
constructor(size: Int, family: String = "sans-serif", weight: String = "normal", style: String = "normal", variant: String = "normal")
actual constructor()
actual constructor(family: String, weight: FontWeight, size: Int)

Types

Link copied to clipboard
object Companion

Properties

family
Link copied to clipboard

The font family.

Link copied to clipboard
var font: Font
size
Link copied to clipboard
var size: Float
var size: Int
var size: Int

The font size.

Link copied to clipboard

The font style.

Link copied to clipboard
Link copied to clipboard

The font variant.

weight
Link copied to clipboard
var weight: FontWeight

The font weight.

Functions

Link copied to clipboard
actual fun copy(font: Font)
expect fun copy(font: Font)
actual fun copy(font: Font)
actual fun copy(font: Font)
actual fun copy(font: Font)
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard
actual fun measureChars(text: String): FloatArray

Per-character advance widths for text in raw pixels, parallel to the input chars. Sum of the array roughly equals measureText (small difference allowed for kerning adjustments between adjacent glyphs).

expect fun measureChars(text: String): FloatArray

Per-character advance widths for text in raw pixels, parallel to the input chars. Sum of the array roughly equals measureText (small difference allowed for kerning adjustments between adjacent glyphs).

actual fun measureChars(text: String): FloatArray

Per-character advance widths for text in raw pixels, parallel to the input chars. Sum of the array roughly equals measureText (small difference allowed for kerning adjustments between adjacent glyphs).

actual fun measureChars(text: String): FloatArray

Per-character advance widths for text in raw pixels, parallel to the input chars. Sum of the array roughly equals measureText (small difference allowed for kerning adjustments between adjacent glyphs).

actual fun measureChars(text: String): FloatArray

Per-character advance widths for text in raw pixels, parallel to the input chars. Sum of the array roughly equals measureText (small difference allowed for kerning adjustments between adjacent glyphs).

Link copied to clipboard
actual fun measureText(text: String): Float

Advance width of text in raw pixels using this font's typeface + size. Includes kerning where the platform supports it. Returns 0 for empty input. Used by per-glyph placement (e.g. baseline-following text along a curve).

expect fun measureText(text: String): Float

Advance width of text in raw pixels using this font's typeface + size. Includes kerning where the platform supports it. Returns 0 for empty input. Used by per-glyph placement (e.g. baseline-following text along a curve).

actual fun measureText(text: String): Float

Advance width of text in raw pixels using this font's typeface + size. Includes kerning where the platform supports it. Returns 0 for empty input. Used by per-glyph placement (e.g. baseline-following text along a curve).

actual fun measureText(text: String): Float

Advance width of text in raw pixels using this font's typeface + size. Includes kerning where the platform supports it. Returns 0 for empty input. Used by per-glyph placement (e.g. baseline-following text along a curve).

actual fun measureText(text: String): Float

Advance width of text in raw pixels using this font's typeface + size. Includes kerning where the platform supports it. Returns 0 for empty input. Used by per-glyph placement (e.g. baseline-following text along a curve).

toString
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String

A string representing this font's style, weight, size and family properties, suitable for passing directly to a 2D canvas context.