Class CustomGlyph
- Namespace
- KernSmith
- Assembly
- KernSmith.dll
A custom glyph image that replaces or adds a glyph in the font. You must decode images to raw pixels yourself before passing them here.
public sealed record CustomGlyph : IEquatable<CustomGlyph>
- Inheritance
-
CustomGlyph
- Implements
- Inherited Members
Constructors
CustomGlyph(int, int, byte[], PixelFormat, int?)
A custom glyph image that replaces or adds a glyph in the font. You must decode images to raw pixels yourself before passing them here.
public CustomGlyph(int Width, int Height, byte[] PixelData, PixelFormat Format = PixelFormat.Rgba32, int? XAdvance = null)
Parameters
WidthintWidth in pixels.
HeightintHeight in pixels.
PixelDatabyte[]Raw pixel data (not PNG/JPG -- already decoded).
FormatPixelFormatPixel format. Default is RGBA.
XAdvanceint?Cursor advance after this glyph. When null, uses the glyph width.
Properties
Format
Pixel format. Default is RGBA.
public PixelFormat Format { get; init; }
Property Value
Height
Height in pixels.
public int Height { get; init; }
Property Value
PixelData
Raw pixel data (not PNG/JPG -- already decoded).
public byte[] PixelData { get; init; }
Property Value
- byte[]
Width
Width in pixels.
public int Width { get; init; }
Property Value
XAdvance
Cursor advance after this glyph. When null, uses the glyph width.
public int? XAdvance { get; init; }
Property Value
- int?