committed by
GitHub
10 changed files with 176 additions and 19 deletions
@ -0,0 +1,27 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace Avalonia.Media |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Specifies algorithmic style simulations to be applied to the typeface.
|
||||
|
/// Bold and oblique simulations can be combined via bitwise OR operation.
|
||||
|
/// </summary>
|
||||
|
[Flags] |
||||
|
public enum FontSimulations : byte |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// No simulations are performed.
|
||||
|
/// </summary>
|
||||
|
None = 0x0000, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Algorithmic emboldening is performed.
|
||||
|
/// </summary>
|
||||
|
Bold = 0x0001, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Algorithmic italicization is performed.
|
||||
|
/// </summary>
|
||||
|
Oblique = 0x0002 |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
namespace Avalonia.Media; |
||||
|
|
||||
|
public readonly struct GlyphMetrics |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Distance from the x-origin to the left extremum of the glyph.
|
||||
|
/// </summary>
|
||||
|
public int XBearing { get; init; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Distance from the top extremum of the glyph to the y-origin.
|
||||
|
/// </summary>
|
||||
|
public int YBearing{ get; init; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Distance from the left extremum of the glyph to the right extremum.
|
||||
|
/// </summary>
|
||||
|
public int Width{ get; init; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Distance from the top extremum of the glyph to the bottom extremum.
|
||||
|
/// </summary>
|
||||
|
public int Height{ get; init; } |
||||
|
} |
||||
Loading…
Reference in new issue