Show / Hide Table of Contents

Struct GlyphMetrics

A set of values that define the size, position and spacing of a glyph when performing text layout.

Implements
IEquatable<GlyphMetrics>
Inherited Members
ValueType.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Namespace: UnityEngine.TextCore
Assembly: UnityEngine.dll
Syntax
[Serializable]
public struct GlyphMetrics : IEquatable<GlyphMetrics>

Constructors

| Improve this Doc View Source

GlyphMetrics(Single, Single, Single, Single, Single)

Constructor for new glyph metrics.

Declaration
public GlyphMetrics(float width, float height, float bearingX, float bearingY, float advance)
Parameters
Type Name Description
Single width

The width of the glyph.

Single height

The height of the glyph.

Single bearingX

The horizontal bearingX.

Single bearingY

The horizontal bearingY.

Single advance

The horizontal advance.

Properties

| Improve this Doc View Source

height

The height of the glyph.

Declaration
public float height { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

horizontalAdvance

The horizontal distance to increase (left to right) or decrease (right to left) the drawing position relative to the origin of the text element. This determines the origin position of the next text element.

Declaration
public float horizontalAdvance { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

horizontalBearingX

The horizontal distance from the current drawing position (origin) relative to the element's left bounding box edge (bbox).

Declaration
public float horizontalBearingX { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

horizontalBearingY

The vertical distance from the current baseline relative to the element's top bounding box edge (bbox).

Declaration
public float horizontalBearingY { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

width

The width of the glyph.

Declaration
public float width { get; set; }
Property Value
Type Description
Single

Methods

| Improve this Doc View Source

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
ValueType.Equals(Object)
| Improve this Doc View Source

Equals(GlyphMetrics)

Declaration
public bool Equals(GlyphMetrics other)
Parameters
Type Name Description
GlyphMetrics other
Returns
Type Description
Boolean
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
ValueType.GetHashCode()

Operators

| Improve this Doc View Source

Equality(GlyphMetrics, GlyphMetrics)

Declaration
public static bool operator ==(GlyphMetrics lhs, GlyphMetrics rhs)
Parameters
Type Name Description
GlyphMetrics lhs
GlyphMetrics rhs
Returns
Type Description
Boolean
| Improve this Doc View Source

Inequality(GlyphMetrics, GlyphMetrics)

Declaration
public static bool operator !=(GlyphMetrics lhs, GlyphMetrics rhs)
Parameters
Type Name Description
GlyphMetrics lhs
GlyphMetrics rhs
Returns
Type Description
Boolean

Implements

System.IEquatable<T>

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX