Table of Contents

Interface IGlyphRasterizer

Namespace
Icy.Rendering.Fonts
Assembly
IcyUI.dll

Represents a glyph rasterizer that can convert font glyphs to textures.

public interface IGlyphRasterizer : IDisposable
Inherited Members
Extension Methods

Methods

ContainsGlyph(int)

Checks if the character is supported in this font.

bool ContainsGlyph(int codepoint)

Parameters

codepoint int

Unicode character codepoint to check.

Returns

bool

true if the character with the specified codepoint is supported by this font instance; otherwise false.

GetFontMetrics(float, FontStyle)

Gets metrics for the font with the specified font size.

FontMetrics GetFontMetrics(float fontSize, FontStyle style)

Parameters

fontSize float

Expected font size in points to calculate scaled metrics for.

style FontStyle

The style of the font to use.

Returns

FontMetrics

An instance of the FontMetrics struct with font calculated metrics.

GetGlyphMetrics(int, float, FontStyle)

Gets the metrics for a glyph at the specified size and style.

FontGlyph GetGlyphMetrics(int codepoint, float size, FontStyle style)

Parameters

codepoint int

The Unicode codepoint of the glyph.

size float

The size of the glyph in pixels.

style FontStyle

The style of the font.

Returns

FontGlyph

The metrics for the glyph.

GetKerning(int, int, float, FontStyle)

Gets the kerning between two glyphs.

float GetKerning(int first, int second, float size, FontStyle style)

Parameters

first int

First glyph codepoint.

second int

Second glyph codepoint.

size float

Font size.

style FontStyle

Font style.

Returns

float

The kerning value in pixels.

RasterizeGlyph(int, float, FontStyle)

Rasterizes a glyph at the specified size and style.

IMemoryOwner<byte>? RasterizeGlyph(int codepoint, float size, FontStyle style)

Parameters

codepoint int

The Unicode codepoint of the glyph to rasterize.

size float

The size of the glyph in pixels.

style FontStyle

The style of the glyph.

Returns

IMemoryOwner<byte>

The rasterized glyph pixels byte sequence.