29 lines
845 B
C#
29 lines
845 B
C#
using BlurgText;
|
|
|
|
namespace Dashboard.Drawing.OpenGL.Text
|
|
{
|
|
public class DbBlurgFont : IFont
|
|
{
|
|
public IDrawExtension Kind { get; } = BlurgFontExtension.Instance;
|
|
public Blurg Owner { get; }
|
|
public BlurgFont Font { get; }
|
|
public float Size { get; }
|
|
public string Family => Font.FamilyName;
|
|
public FontWeight Weight => (FontWeight)Font.Weight.Value;
|
|
public FontSlant Slant => Font.Italic ? FontSlant.Italic : FontSlant.Normal;
|
|
public FontStretch Stretch => FontStretch.Normal;
|
|
|
|
public DbBlurgFont(Blurg owner, BlurgFont font, float size)
|
|
{
|
|
Owner = owner;
|
|
Font = font;
|
|
Size = size;
|
|
}
|
|
|
|
public DbBlurgFont WithSize(float size)
|
|
{
|
|
return new DbBlurgFont(Owner, Font, size);
|
|
}
|
|
}
|
|
}
|