Table of Contents

Class ClusterAdvanceBuffer

Namespace
DocWright.Fonts
Assembly
DocWright.Fonts.dll

Reusable growable buffer for ClusterAdvance values.

public sealed class ClusterAdvanceBuffer
Inheritance
ClusterAdvanceBuffer
Inherited Members

Remarks

Reusing one buffer per measurement context keeps the hot measurement path allocation free after warmup.

Constructors

ClusterAdvanceBuffer()

Initializes a buffer with the default initial capacity (64 clusters).

ClusterAdvanceBuffer(int)

Initializes a buffer with an explicit initial capacity.

Properties

Capacity

Gets the current buffer capacity.

Count

Gets the number of cluster advances currently buffered.

this[int]

Gets one buffered item by index.

Methods

Add(in ClusterAdvance)

Appends one item, growing geometrically when full.

AsSpan()

Returns a span over the buffered items.

Clear()

Clears the buffer (capacity retained).

EnsureCapacity(int)

Ensures the buffer can hold at least the requested capacity.