Dashboard/Quik/Typography/QuikGlyph.cs

54 lines
1.5 KiB
C#

namespace Quik.Typography
{
/// <summary>
/// Glyph properties with metrics based on FreeType glyph metrics.
/// </summary>
public struct QuikGlyph
{
/// <summary>
/// The code point for the character.
/// </summary>
public int Character { get; }
/// <summary>
/// Location of the glyph on the atlas.
/// </summary>
public QuikRectangle Location { get; }
/// <summary>
/// Size of the glyph in units.
/// </summary>
public QuikVec2 Size { get; }
/// <summary>
/// Bearing vector for horizontal layout.
/// </summary>
public QuikVec2 HorizontalBearing { get; }
/// <summary>
/// Bearing vector for vertical layout.
/// </summary>
public QuikVec2 VerticalBearing { get; }
/// <summary>
/// Advance vector for vertical and horizontal layouts.
/// </summary>
public QuikVec2 Advance { get; }
public QuikGlyph(
int character,
QuikRectangle location,
QuikVec2 size,
QuikVec2 horizontalBearing,
QuikVec2 verticalBearing,
QuikVec2 advance)
{
Character = character;
Location = location;
Size = size;
HorizontalBearing = horizontalBearing;
VerticalBearing = verticalBearing;
Advance = advance;
}
}
}