27 lines
762 B
C#
27 lines
762 B
C#
|
using BlurgText;
|
||
|
|
||
|
namespace Dashboard.Drawing.OpenGL.Text
|
||
|
{
|
||
|
public class DbBlurgFont : IFont
|
||
|
{
|
||
|
public IDrawExtension Kind { get; } = BlurgFontExtension.Instance;
|
||
|
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(BlurgFont font, float size)
|
||
|
{
|
||
|
Font = font;
|
||
|
Size = size;
|
||
|
}
|
||
|
|
||
|
public DbBlurgFont WithSize(float size)
|
||
|
{
|
||
|
return new DbBlurgFont(Font, size);
|
||
|
}
|
||
|
}
|
||
|
}
|