Table of Contents

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

Width int

Width in pixels.

Height int

Height in pixels.

PixelData byte[]

Raw pixel data (not PNG/JPG -- already decoded).

Format PixelFormat

Pixel format. Default is RGBA.

XAdvance int?

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

PixelFormat

Height

Height in pixels.

public int Height { get; init; }

Property Value

int

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

int

XAdvance

Cursor advance after this glyph. When null, uses the glyph width.

public int? XAdvance { get; init; }

Property Value

int?