Table of Contents

Enum GlyphOrientation

Namespace
DocWright.Core.Rendering
Assembly
DocWright.Core.dll

The quarter turn applied to a run's baseline, measured clockwise from upright.

public enum GlyphOrientation : byte

Fields

Upright = 0

Upright: the baseline advances +x and glyph up is -y. The default.

Clockwise90 = 1

Turned a quarter turn clockwise: the baseline advances +y (down the page) and glyph up is +x. This is what w:textDirection tbRl and a:bodyPr vert ask for.

Half180 = 2

Turned a half turn: the baseline advances -x and glyph up is +y.

CounterClockwise90 = 3

Turned a quarter turn counter-clockwise: the baseline advances -y (up the page) and glyph up is -x. This is what w:textDirection btLr, a:bodyPr vert270 and a chart's value-axis title ask for.

Remarks

Only quarter turns are representable, and deliberately so. Every construct that asks for turned text — a table cell's w:textDirection, a DrawingML text body's a:bodyPr/@vert, a chart's value-axis title — is defined as a multiple of 90°, and a quarter turn is exact in a way an arbitrary angle is not: it maps integer twips to integer twips with nothing to round, and it maps a rasterized glyph to a rasterized glyph by transposition rather than resampling.

BaselineX and BaselineY keep their meaning under a turn: they are the run's origin — the baseline's starting point, at the left edge of its first glyph in reading order. The run then advances away from that origin along the turned axis, and the baseline itself runs perpendicular to the glyphs' up direction.