You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Java DOCX renderer: align Latin document layout with Word (14_Thesis_Chapter) #187
This issue tracks the Java DOCX renderer session that brought 14_Thesis_Chapter to near-pixel parity with Microsoft 365 Word.
Metric
Before
After
14_Thesis_Chapter overall
0.9856
0.9932
14_Thesis_Chapter text similarity
0.9979
1.0
14_Thesis_Chapter visual
-
0.983
Pages
2/2
2/2
Full issue/docx benchmark average
0.7225
0.7224 (28 cases)
Unit tests
20/20
78/79 (issues66 CJK smoke test now passes; 1 pre-existing Vietnamese issue91 extraction failure remains)
Session Flow
Diagnose remaining image differences between minipdf, Word reference, and LibreOffice renders of 14_Thesis_Chapter p1: headings not bold, bullets missing, body lines wrapped wider than Word, table offset, and wrong page-break position.
Heading bold — port Word's effective bold: paragraph-mark pPr/rPr and paragraph style rPr (CTParaRPr / CTRPr).
Bullet markers — resolve numPr → abstractNum → lvl via XWPFNumbering; map Symbol PUA bullet (\uF0B7) to •.
Heading color — apply paragraph-style rPr/w:color (Heading2 blue 4F81BD) when runs carry no explicit color.
Calibri-default documents: Times table with -8.8 units/letter kerning for serif runs, Calibri ×0.977 otherwise.
Other defaults: wrap with actual TTF advances (PDType0Font#getStringWidth), since Word lays out with the same TTF metrics.
Center/right alignment positioned with actual font advances.
Paragraph flow parity — contextualSpacing collapse between same-style paragraphs, keepNext widow control (reserve heading + up to 3 follow lines), top-of-page baseline = margin + font ascent, spacing-before suppressed at page top, spacing-after not collapsed across tables.
Activity