2.1.2.4 VerticalTextAlignmentMode Flags

VerticalTextAlignmentMode Flags specify the relationship between a reference point and a bounding rectangle, for text alignment. These flags can be combined to specify multiple options, with the restriction that only one flag can be chosen that alters the drawing position in the playback device context.

Vertical text alignment is performed when the font has a vertical default baseline, such as Kanji.

Constant/value

Description

VTA_TOP

0x0000

The reference point MUST be on the top edge of the bounding rectangle.

VTA_RIGHT

0x0000

The reference point MUST be on the right edge of the bounding rectangle.

VTA_BOTTOM

0x0002

The reference point MUST be on the bottom edge of the bounding rectangle.

VTA_CENTER

0x0006

The reference point MUST be aligned vertically with the center of the bounding rectangle.

VTA_LEFT

0x0008

The reference point MUST be on the left edge of the bounding rectangle.

VTA_BASELINE

0x0018

The reference point MUST be on the baseline of the text.

When the font that is defined in the playback device context has a vertical default baseline, as with Kanji, VerticalTextAlignmentMode flags MUST be used instead of TextAlignmentMode flags (section 2.1.2.3) where there exists an equivalent.

Both horizontal and vertical flags are named relative to their respective baselines. Thus, VTA_LEFT is the same as TA_BOTTOM, because the bottom edge of the bounding rectangle in normal text orientation becomes the left edge of the bounding rectangle with orientation relative to the vertical baseline.