Show / Hide Table of Contents

Class Glyph

A Glyph is the visual representation of a text element or character.

Inheritance
Object
Glyph
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine.TextCore
Assembly: UnityEngine.dll
Syntax
[Serializable]
public class Glyph

Constructors

| Improve this Doc View Source

Glyph()

Constructor for a new glyph.

Declaration
public Glyph()
| Improve this Doc View Source

Glyph(UInt32, GlyphMetrics, GlyphRect)

Constructor for new glyph. The scale will be set to a value of 1.0 and atlas index to 0.

Declaration
public Glyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect)
Parameters
Type Name Description
UInt32 index

The index of the glyph in the font file.

GlyphMetrics metrics

The metrics of the glyph.

GlyphRect glyphRect

The GlyphRect defining the position of the glyph in the atlas texture.

| Improve this Doc View Source

Glyph(UInt32, GlyphMetrics, GlyphRect, Single, Int32)

Constructor for new glyph.

Declaration
public Glyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect, float scale, int atlasIndex)
Parameters
Type Name Description
UInt32 index

The index of the glyph in the font file.

GlyphMetrics metrics

The metrics of the glyph.

GlyphRect glyphRect

The GlyphRect defining the position of the glyph in the atlas texture.

Single scale

The relative scale of the glyph.

Int32 atlasIndex

The index of the atlas texture that contains the glyph.

| Improve this Doc View Source

Glyph(Glyph)

Constructor for a new glyph

Declaration
public Glyph(Glyph glyph)
Parameters
Type Name Description
Glyph glyph

Glyph whose values are copied to the new glyph.

Properties

| Improve this Doc View Source

atlasIndex

The index of the atlas texture that contains this glyph.

Declaration
public int atlasIndex { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

glyphRect

A rectangle that defines the position of a glyph within an atlas texture.

Declaration
public GlyphRect glyphRect { get; set; }
Property Value
Type Description
GlyphRect
| Improve this Doc View Source

index

The index of the glyph in the source font file.

Declaration
public uint index { get; set; }
Property Value
Type Description
UInt32
| Improve this Doc View Source

metrics

The metrics that define the size, position and spacing of a glyph when performing text layout.

Declaration
public GlyphMetrics metrics { get; set; }
Property Value
Type Description
GlyphMetrics
| Improve this Doc View Source

scale

The relative scale of the glyph. The default value is 1.0.

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

Methods

| Improve this Doc View Source

Compare(Glyph)

Compares two glyphs to determine if they have the same values.

Declaration
public bool Compare(Glyph other)
Parameters
Type Name Description
Glyph other

The glyph to compare with.

Returns
Type Description
Boolean

Returns true if the glyphs have the same values. False if not.

Extension Methods

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