Struct GlyphMetrics
A set of values that define the size, position and spacing of a glyph when performing text layout.
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
Declaration
public float height { get; set; }
Property Value
|
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
|
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
|
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
|
Improve this Doc
View Source
width
Declaration
public float width { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
|
Improve this Doc
View Source
Equals(GlyphMetrics)
Declaration
public bool Equals(GlyphMetrics other)
Parameters
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
Operators
|
Improve this Doc
View Source
Equality(GlyphMetrics, GlyphMetrics)
Declaration
public static bool operator ==(GlyphMetrics lhs, GlyphMetrics rhs)
Parameters
Returns
|
Improve this Doc
View Source
Inequality(GlyphMetrics, GlyphMetrics)
Declaration
public static bool operator !=(GlyphMetrics lhs, GlyphMetrics rhs)
Parameters
Returns
Implements
Extension Methods