Table of Contents

Struct Tag

Namespace
SixLabors.Fonts.Tables.AdvancedTypographic
Assembly
SixLabors.Fonts.dll

Data type for tag identifiers. Tags are four byte integers, each byte representing a character. Tags are used to identify tables, design-variation axes, scripts, languages, font features, and baselines with human-readable names.

public readonly struct Tag : IEquatable<Tag>
Implements
Inherited Members

Constructors

Tag(uint)

Initializes a new instance of the Tag struct.

public Tag(uint value)

Parameters

value uint

The tag value.

Properties

Value

Gets the Tag value as 32 bit unsigned integer.

public uint Value { get; }

Property Value

uint

Methods

Equals(Tag)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Tag other)

Parameters

other Tag

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Parse(string)

Converts the string representation of a number to its Tag equivalent.

public static Tag Parse(string value)

Parameters

value string

A string containing a tag to convert.

Returns

Tag

The Tag.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(Tag, Tag)

Determines whether two Tag instances are equal.

public static bool operator ==(Tag left, Tag right)

Parameters

left Tag

The left tag.

right Tag

The right tag.

Returns

bool

true if the tags are equal; otherwise, false.

implicit operator Tag(KnownFeatureTags)

Implicitly converts a KnownFeatureTags to a Tag.

public static implicit operator Tag(KnownFeatureTags value)

Parameters

value KnownFeatureTags

The feature tag enum value.

Returns

Tag

implicit operator Tag(uint)

Implicitly converts a uint to a Tag.

public static implicit operator Tag(uint value)

Parameters

value uint

The unsigned integer value.

Returns

Tag

operator !=(Tag, Tag)

Determines whether two Tag instances are not equal.

public static bool operator !=(Tag left, Tag right)

Parameters

left Tag

The left tag.

right Tag

The right tag.

Returns

bool

true if the tags are not equal; otherwise, false.