Table of Contents

Class FontVerticalMetrics

Namespace
DocWright.Fonts
Assembly
DocWright.Fonts.dll

The single-line vertical metric rule: which of a face's three competing metric families determines its line height, and how that height converts to twips.

public static class FontVerticalMetrics
Inheritance
FontVerticalMetrics
Inherited Members

Remarks

This rule previously existed verbatim in two assemblies — the font engine's measurement path and the layout engine's — which meant a change to one silently disagreed with the other. It lives here so there is exactly one implementation and one place to test.

The rule is measured against Word rather than taken from the specification; see WORDQUIRKS.md WQ-0003 for the comparison and the faces it was measured on.

Methods

Measure(FontFace, Twips, Twips, int)

Measures one face's single-line box and packages it with an already-measured advance.

Select(FontFace, out int, out int, out int)

Selects the ascent, descent and line gap in font units, before any twip conversion.