Table of Contents

Class TextLayout

Namespace
MiPdf.Layout
Assembly
MiPdf.dll

Line breaking and rendering of paragraphs. Also usable for simple multi-line text.

public static class TextLayout
Inheritance
TextLayout
Inherited Members

Properties

DefaultHyphenator

Hyphenator used by paragraphs without their own Hyphenator (default none).

public static IHyphenator? DefaultHyphenator { get; set; }

Property Value

IHyphenator

Methods

BreakLines(string, PdfFont, double, double)

Breaks plain text into lines that fit into width points.

public static IReadOnlyList<string> BreakLines(string text, PdfFont font, double fontSize, double width)

Parameters

text string
font PdfFont
fontSize double
width double

Returns

IReadOnlyList<string>

MeasureHeight(string, PdfFont, double, double, double)

Measures the height of plain text wrapped to width.

public static double MeasureHeight(string text, PdfFont font, double fontSize, double width, double lineSpacing = 1.15)

Parameters

text string
font PdfFont
fontSize double
width double
lineSpacing double

Returns

double