Vertical form substitution using the 'mort' table

A special version of the glyph metamorphosis table ('mort') was defined for use under certain FE versions of Windows 3.1. Although Microsoft recommends the 'GSUB' table, font vendors may still wish to include a 'mort' table in their fonts for backwards compatibility. Future versions of Windows will support only 'GSUB'.

As with 'GSUB', GDI recognizes only a very specific implementation of 'mort'. The majority of the table will be constants to specify vertical character substitution only.

Type

Name

Contents

(constants)

0x000100000000000100000001

Uint32

length1

Length of the whole table - 8

(constants)

0x000300010003000000000001FFFFFFFF

(constants)

0x0003000100000000FFFFFFFE00080000

(constants)

0x0000000000000000

Uint16

length2

Length of the whole table - 0x38

(constants)

0x8004000000010006

BinSrchHeader

binSrchHeader

Binary Search Header

LookupSingle

entries[n]

Actual lookup entries, sorted by glyph index


BinSrchHeader

Type

Name

Contents

Uint16

entrySize

Size in bytes of a lookup entry (set to 4)

Uint16

nEntries

Number of lookup entries to be searched

Uint16

searchRange

entrySize * (largest power of 2 less than or equal to nEntries)

Uint16

entrySelector

log2 of (largest power of 2 less than or equal to nEntries)

Uint16

rangeShift

entrySize * (nEntries - largest power of 2 less than or equal to nEntries)


LookupSingle

Type

Name

Contents

GlyphID

glyphid1

The glyph index for the horizontal shape

GlyphID

glyphid2

The glyph index for the vertical shape


The last lookup entry must be a sentinel with glyphid1=glyphid2=0xFFFF. The glyph sets should be exactly the same as those in 'GSUB'.