-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGlyphData.cs
More file actions
32 lines (29 loc) · 980 Bytes
/
GlyphData.cs
File metadata and controls
32 lines (29 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace OpenWheels.Fonts
{
/// <summary>
/// Data for a glyph with bounds in pixels.
/// </summary>
public struct GlyphData
{
/// <summary>
/// UTF-32 encoded character of the glyph.
/// </summary>
public int Character { get; }
// TODO support glyphs more than 1 codepoint
/// <summary>
/// Bounds of the glyph on the texture atlas in pixels.
/// </summary>
public Rectangle Bounds { get; }
/// <summary>
/// Create a new <see cref="GlyphData"/> instance.
/// </summary>
/// <param name="character">UTF-32 encoded character of the glyph</param>
/// <param name="bounds">Bounds of the glyph on the texture atlas in pixels.</param>
public GlyphData(int character, Rectangle bounds)
{
Character = character;
Bounds = bounds;
}
internal static GlyphData Default = new GlyphData();
}
}