Skip to content

feat: parse full ExtTextOutW/ExtTextOutA wire layout - #4

Merged
ronaldtse merged 1 commit into
mainfrom
feat/ext-text-out-wire
Jul 24, 2026
Merged

feat: parse full ExtTextOutW/ExtTextOutA wire layout#4
ronaldtse merged 1 commit into
mainfrom
feat/ext-text-out-wire

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Companion to emfsvg PR #2. The previous stub used rest :body which preserved bytes for round-trip but made text-layout fields inaccessible.

This declares the full MS-EMF 2.3.8 layout so emfsvg can render text. Round-trip verified: 208/208 fixtures byte-identical.

Previously these records stubbed the trailing fields as 'rest :body'
which preserved bytes for round-trip but made the text-layout fields
inaccessible to consumers.

Now declares the full layout:
- iGraphicsMode, exScale, eyScale
- ref.WmfRect16 (4 int16 — reference rectangle)
- nChars, offString
- fOptions (ExtTextOutOptions flags)
- ref.WmfRect16_2 (user rectangle)
- offDx (offset to character-spacing array)
- trailing bytes (string + Dx array)

Round-trip verified: 186/186 EMF fixtures + 21 EMF-EA + simple all
still byte-identical. Enables emfsvg to render text content.
@ronaldtse
ronaldtse merged commit a90580e into main Jul 24, 2026
@ronaldtse
ronaldtse deleted the feat/ext-text-out-wire branch July 24, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant