Skip to content

Commit 3e617d8

Browse files
KnifeLemonclaude
andcommitted
Merge origin/builtin-engines into feat/doc-reader
Conflicts with the HWP writer (#948) and the HWP scan (#938): - HwpxConverter: the hwpx → hwp edge and the DOC capability check both kept. - ComplexScripts: both scanners kept (HWP through its package, DOC through its text). - ENGINES.md: the slide renderer and sheet printing text, with DOC added. - HwpWriterTests: CompoundFile now lives in Filee.Engines.Documents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 parents 4d0f610 + 0bb0714 commit 3e617d8

99 files changed

Lines changed: 15160 additions & 296 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎THIRD-PARTY-NOTICES.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ app as its payload. Filee 1.x's installer was built with Inno Setup, which is no
106106

107107
## Hancom HWP document format
108108

109-
Filee's own HWP and HWPX code (the HWP 5.0 reader and its HWP → HWPX conversion, the HWPX reader and writer, and the
110-
layout engine) was developed with reference to Hancom's published document on the HWP file format, 「한글 문서 파일
111-
형식 5.0」, which asks for this notice:
109+
Filee's own HWP and HWPX code (the HWP 5.0 reader and its HWP → HWPX conversion, the HWP 5.0 writer and its HWPX → HWP
110+
conversion, the HWPX reader and writer, and the layout engine) was developed with reference to Hancom's published
111+
document on the HWP file format, 「한글 문서 파일 형식 5.0」, which asks for this notice:
112112

113113
본 제품은 한글과컴퓨터의 한/글 문서 파일(.hwp) 공개 문서를 참고하여 개발하였습니다.
114114

‎docs/ENGINES.md‎

Lines changed: 270 additions & 24 deletions
Large diffs are not rendered by default.

‎docs/RENDER-QUALITY.md‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,56 @@ shaping. A feature's entry also covers its rendering from the binary HWP.
115115
paragraphs are laid out by Filee at the width 한글 used, and their line starts are compared with the ones 한글
116116
stored (`hp:linesegarray`).
117117

118+
## Slides
119+
120+
The [slide renderer](ENGINES.md#filee-renderer-slides) has its own section of the harness, `SlideQualityTests.cs`
121+
(renderer `filee-slides` in `render-thresholds.json`). `SlideFeatures.cs` writes one deck with `SlideDeckBuilder`: an
122+
Office theme (colour, font and format schemes with fill, line, effect and background styles), a master with text
123+
styles, placeholders and a decorative bar, three layouts, and one slide per feature.
124+
125+
| Feature | What the slide holds |
126+
|---|---|
127+
| `title` | the title layout's centred title and subtitle placeholders, the master's background reference and bar |
128+
| `shapes` | 16 presets with PowerPoint's default shape style (theme fill, line and text colour) and labels, and again with their own fills and 2 pt lines |
129+
| `lines` | straight connectors with every arrowhead, sizes and preset dashes; a double line; bent and curved connectors; a round-capped dashed line; a freeform with lines, an arc, a quadratic and a cubic curve |
130+
| `text` | the content layout's body with bullets on two levels and auto numbers; shrink text on overflow (stored scale and spacing reduction); two columns; right-aligned italic text with a hyperlink |
131+
| `vertical-text` | frames turned 90° and 270°, a shape turned 30° with its text, a mirrored arrow and a flipped triangle |
132+
| `scripts` | Korean, Japanese, Arabic (right to left) and Hindi through the theme's script fonts |
133+
| `pictures` | a picture as it is, cropped, turned with an outline, in an ellipse, grey, half transparent, and tiled into a rounded rectangle |
134+
| `tables` | PowerPoint's default table style (header row, banded rows, a cell merged across) and a table with its own lines and fills |
135+
| `fills` | linear (angle, scaled), circle and rectangle gradients; six patterns; transparent overlapping fills; a turned group; a gradient background |
136+
| `smartart-chart` | SmartArt through its stored drawing, a chart through its fallback picture |
137+
138+
- **Read-back** (`Slide_features_read_back`, always): each slide's text on its page (`/ActualText` included), one page
139+
per slide, no glyph outside a slide, overlapping glyphs, every font embedded and subset. Overlaps leave out what the
140+
font's own kerning asks for (`FontKerning`: the pair shaped again with HarfBuzz in the installed font the PDF's subset
141+
came from): "Tr", "Fi" and "f." kern by 0.06 to 0.15 em depending on the fonts installed, which the plain 0.05 em
142+
tolerance counted, so a threshold measured on one platform failed on another.
143+
- **Against LibreOffice** (`Slide_features_compared_with_libreoffice`): LibreOffice converts the same deck to PDF and
144+
each slide is compared (`vs-libreoffice-ssim`, PDFium at 100 dpi, as for documents). LibreOffice is looked for in
145+
`FILEE_LIBREOFFICE` (soffice itself), the repository's `engines/` folder (`pwsh build/fetch-engines.ps1 -Only
146+
libreoffice`) and the usual install folders; without it the test is skipped. CI doesn't fetch LibreOffice, so there
147+
the slides get the read-back only. With `FILEE_RENDER_OUT`, the deck, both PDFs and a Filee | LibreOffice picture of
148+
every slide (`slides-<feature>.png`) are kept.
149+
150+
Measured with LibreOffice 26.2 on Windows 11 (Office fonts installed):
151+
152+
| Slide | SSIM | What differs |
153+
|---|---|---|
154+
| `title` | 0.6275 | the text sits about a point apart |
155+
| `shapes` | 0.9819 | |
156+
| `lines` | 0.8743 | LibreOffice draws the double line as one thick line and arrowheads a little larger |
157+
| `text` | 0.6238 | LibreOffice recomputes "shrink text on overflow" (larger text in the orange box); lines a point or two apart |
158+
| `vertical-text` | 0.9598 | |
159+
| `scripts` | 0.3005 | LibreOffice draws 맑은 고딕 as NanumGothic and Japanese in another face |
160+
| `pictures` | 0.8807 | LibreOffice tiles the picture smaller |
161+
| `tables` | 0.92 | |
162+
| `fills` | 0.8571 | rectangle gradients (an ellipse in Filee), pattern cells |
163+
| `smartart-chart` | 0.9682 | |
164+
165+
The deck read back: every slide's text found, nothing outside a slide, every font embedded and subset, no glyphs
166+
overlapping beyond their font's kerning.
167+
118168
## rhwp today
119169

120170
rhwp 0.8.7 on Windows, the CI matrix. Every feature not listed meets the ideal in every check. That covers the

‎src/Filee.App/Assets/i18n/ar.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@
176176
"engine.markdown.description": "تحويل Markdown إلى HTML ونص عادي.\nتحويل ملفات النصوص والشيفرات المصدرية للبرامج النصية إلى TXT بترميز UTF-8، دون تشغيلها.",
177177
"engine.spreadsheet.name": "Spreadsheets (built-in)",
178178
"engine.spreadsheet.description": "التحويل بين XLSX وXLS وODS وCSV وTSV ‏(قراءة XLS فقط).\nملف CSV مستقل لكل ورقة.",
179+
"engine.sheet-print.name": "طباعة جداول البيانات (مدمج)",
180+
"engine.sheet-print.description": "يطبع ملفات XLSX وXLS وODS إلى PDF كما يفعل Excel، دون Excel أو LibreOffice:\nإعداد الصفحة ومناطق الطباعة وعناوينها وفواصل الصفحات والرؤوس والتذييلات.",
179181
"engine.ooxml.name": "Office Open XML (built-in)",
180182
"engine.ooxml.description": "التحويل بين الملفات والقوالب التي تدعم وحدات الماكرو (DOCM وXLSM وPPTM وDOTX…) وبين DOCX وXLSX وPPTX.\nتُحذف وحدات الماكرو.",
181183
"engine.hwpx-writer.name": "HWPX writer (built-in)",
@@ -970,7 +972,7 @@
970972
"engines.lo_documents": "استخدام LibreOffice لتحويل مستندات Word إلى PDF",
971973
"engines.lo_documents_hint": "يحافظ على تخطيط Word، بما في ذلك قواعد الترقيم الصينية واليابانية.\nعند التعطيل: يُستخدم المسار المدمج.",
972974
"engines.lo_sheets": "استخدام LibreOffice لتحويل جداول البيانات إلى PDF",
973-
"engines.lo_sheets_hint": "تُطبع كما في Excel، مع منطقة الطباعة وإعداد الصفحة وفواصل الصفحات.\nعند التعطيل: يلائم المسار المدمج كل ورقة لعرض الصفحة (مع الاحتفاظ بفواصل الصفحات).",
975+
"engines.lo_sheets_hint_print": "يطبعها LibreOffice Calc بخطوطه الخاصة.\nعند التعطيل: يطبعها Filee بنفسه كما في Excel، مع منطقة الطباعة وإعداد الصفحة وفواصل الصفحات.",
974976
"engines.filee_renderer": "استخدام مُصيِّر Filee (معاينة)",
975977
"engines.filee_renderer_hint": "يُنسّق محرّك Filee الخاص ملفات HWPX ومستندات Word والنصوص وMarkdown وHTML والكتب الإلكترونية في PDF، بدلًا من كاتب HWPX وrhwp.\nالملفات التي تحوي ما لا يرسمه بعد (المخططات، النص العمودي…) تبقى على مسارها المعتاد.",
976978
"engines.package.libreoffice.name": "LibreOffice (الصيغ القديمة والنادرة)",

‎src/Filee.App/Assets/i18n/de.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@
176176
"engine.markdown.description": "Markdown → HTML und reiner Text.\nTextdateien und Skript-Quelltexte → UTF-8-TXT, ohne Skripte auszuführen.",
177177
"engine.spreadsheet.name": "Tabellen (integriert)",
178178
"engine.spreadsheet.description": "Konvertiert XLSX, XLS, ODS, CSV und TSV untereinander (XLS nur lesend).\nEine CSV-Datei pro Tabellenblatt.",
179+
"engine.sheet-print.name": "Tabellendruck (integriert)",
180+
"engine.sheet-print.description": "Druckt XLSX, XLS und ODS wie Excel als PDF, ohne Excel oder LibreOffice:\nSeiteneinrichtung, Druckbereiche und -titel, Seitenumbrüche, Kopf- und Fußzeilen.",
179181
"engine.ooxml.name": "Office Open XML (integriert)",
180182
"engine.ooxml.description": "Dateien mit Makros und Dokumentvorlagen (DOCM, XLSM, PPTM, DOTX…) ↔ DOCX, XLSX, PPTX.\nMakros werden entfernt.",
181183
"engine.hwpx-writer.name": "HWPX-Writer (integriert)",
@@ -970,7 +972,7 @@
970972
"engines.lo_documents": "LibreOffice für Word-Dokumente → PDF verwenden",
971973
"engines.lo_documents_hint": "Layout wie in Word, einschließlich chinesischer und japanischer Satzzeichenregeln.\nAus: integrierte Konvertierung.",
972974
"engines.lo_sheets": "LibreOffice für Tabellen → PDF verwenden",
973-
"engines.lo_sheets_hint": "Druck wie in Excel, mit Druckbereich, Seiteneinrichtung und Seitenumbrüchen.\nAus: integrierte Konvertierung passt jedes Blatt an die Seitenbreite an (Seitenumbrüche bleiben erhalten).",
975+
"engines.lo_sheets_hint_print": "Druck durch LibreOffice Calc mit dessen eigenen Schriften.\nAus: Filee druckt sie selbst wie Excel, mit Druckbereich, Seiteneinrichtung und Seitenumbrüchen.",
974976
"engines.filee_renderer": "Filee-Renderer verwenden (Vorschau)",
975977
"engines.filee_renderer_hint": "Filees eigene Engine setzt HWPX, Word-Dokumente, Text, Markdown, HTML und E-Books als PDF, statt des HWPX-Writers und rhwp.\nDateien mit Inhalten, die sie noch nicht zeichnet (Diagramme, vertikaler Text…), nehmen weiter den gewohnten Weg.",
976978
"engines.package.libreoffice.name": "LibreOffice (ältere und seltene Formate)",

‎src/Filee.App/Assets/i18n/en.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@
183183
"engine.markdown.description": "Markdown → HTML and plain text.\nText and script source files → UTF-8 TXT, without running scripts.",
184184
"engine.spreadsheet.name": "Spreadsheets (built-in)",
185185
"engine.spreadsheet.description": "XLSX, XLS, ODS, CSV and TSV into each other (XLS is read only).\nOne CSV per sheet.",
186+
"engine.sheet-print.name": "Spreadsheet printing (built-in)",
187+
"engine.sheet-print.description": "Prints XLSX, XLS and ODS to PDF the way Excel does, without Excel or LibreOffice:\npage setup, print areas and titles, page breaks, headers and footers.",
186188
"engine.ooxml.name": "Office Open XML (built-in)",
187189
"engine.ooxml.description": "Macro-enabled files and templates (DOCM, XLSM, PPTM, DOTX…) ↔ DOCX, XLSX, PPTX.\nMacros are removed.",
188190
"engine.hwpx-writer.name": "HWPX writer (built-in)",
@@ -987,7 +989,7 @@
987989
"engines.lo_documents": "Use LibreOffice for Word documents → PDF",
988990
"engines.lo_documents_hint": "Laid out as in Word, including Chinese and Japanese punctuation rules.\nOff: the built-in route.",
989991
"engines.lo_sheets": "Use LibreOffice for spreadsheets → PDF",
990-
"engines.lo_sheets_hint": "Printed like Excel, with the print area, page setup and page breaks.\nOff: the built-in route fits each sheet to the page width (page breaks kept).",
992+
"engines.lo_sheets_hint_print": "Printed by LibreOffice Calc with its own fonts.\nOff: Filee prints them itself like Excel, with the print area, page setup and page breaks.",
991993
"engines.filee_renderer": "Use the Filee renderer (preview)",
992994
"engines.filee_renderer_hint": "Filee's own engine lays HWPX, Word documents, text, Markdown, HTML and e-books out to PDF, instead of the HWPX writer and rhwp.\nFiles with what it doesn't draw yet (charts, vertical text…) keep their usual route.",
993995
"engines.package.libreoffice.name": "LibreOffice (older and rare formats)",

‎src/Filee.App/Assets/i18n/es.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@
176176
"engine.markdown.description": "Markdown → HTML y texto sin formato.\nArchivos de texto y código fuente de scripts → TXT en UTF-8, sin ejecutar scripts.",
177177
"engine.spreadsheet.name": "Spreadsheets (built-in)",
178178
"engine.spreadsheet.description": "XLSX, XLS, ODS, CSV y TSV entre sí (XLS es de solo lectura).\nUn CSV por hoja.",
179+
"engine.sheet-print.name": "Impresión de hojas de cálculo (integrado)",
180+
"engine.sheet-print.description": "Imprime XLSX, XLS y ODS en PDF como Excel, sin Excel ni LibreOffice:\nconfiguración de página, áreas y títulos de impresión, saltos de página, encabezados y pies de página.",
179181
"engine.ooxml.name": "Office Open XML (built-in)",
180182
"engine.ooxml.description": "Archivos y plantillas con macros (DOCM, XLSM, PPTM, DOTX…) ↔ DOCX, XLSX, PPTX.\nLas macros se eliminan.",
181183
"engine.hwpx-writer.name": "HWPX writer (built-in)",
@@ -970,7 +972,7 @@
970972
"engines.lo_documents": "Usar LibreOffice para documentos de Word → PDF",
971973
"engines.lo_documents_hint": "Se maquetan como en Word, incluidas las reglas de puntuación china y japonesa.\nDesactivado: la ruta integrada.",
972974
"engines.lo_sheets": "Usar LibreOffice para hojas de cálculo → PDF",
973-
"engines.lo_sheets_hint": "Se imprimen como en Excel, con el área de impresión, la configuración de página y los saltos de página.\nDesactivado: la ruta integrada ajusta cada hoja al ancho de la página (los saltos de página se conservan).",
975+
"engines.lo_sheets_hint_print": "Los imprime LibreOffice Calc con sus propias fuentes.\nDesactivado: Filee los imprime como Excel, con el área de impresión, la configuración de página y los saltos de página.",
974976
"engines.filee_renderer": "Usar el renderizador de Filee (vista previa)",
975977
"engines.filee_renderer_hint": "El motor propio de Filee maqueta en PDF archivos HWPX, documentos de Word, texto, Markdown, HTML y libros electrónicos, en lugar del escritor HWPX y rhwp.\nLos archivos con lo que aún no dibuja (gráficos, texto vertical…) siguen su ruta habitual.",
976978
"engines.package.libreoffice.name": "LibreOffice (formatos antiguos y poco habituales)",

‎src/Filee.App/Assets/i18n/fr.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@
183183
"engine.markdown.description": "Markdown → HTML et texte brut.\nFichiers texte et sources de scripts → TXT UTF-8, sans exécuter les scripts.",
184184
"engine.spreadsheet.name": "Spreadsheets (built-in)",
185185
"engine.spreadsheet.description": "XLSX, XLS, ODS, CSV et TSV entre eux (XLS en lecture seule).\nUn CSV par feuille.",
186+
"engine.sheet-print.name": "Impression de feuilles de calcul (intégré)",
187+
"engine.sheet-print.description": "Imprime les XLSX, XLS et ODS en PDF comme Excel, sans Excel ni LibreOffice :\nmise en page, zones et titres d'impression, sauts de page, en-têtes et pieds de page.",
186188
"engine.ooxml.name": "Office Open XML (built-in)",
187189
"engine.ooxml.description": "Fichiers avec macros et modèles (DOCM, XLSM, PPTM, DOTX…) ↔ DOCX, XLSX, PPTX.\nLes macros sont supprimées.",
188190
"engine.hwpx-writer.name": "HWPX writer (built-in)",
@@ -987,7 +989,7 @@
987989
"engines.lo_documents": "Utiliser LibreOffice pour documents Word → PDF",
988990
"engines.lo_documents_hint": "Mise en page comme dans Word, y compris les règles de ponctuation chinoises et japonaises.\nDésactivé : la chaîne intégrée.",
989991
"engines.lo_sheets": "Utiliser LibreOffice pour feuilles de calcul → PDF",
990-
"engines.lo_sheets_hint": "Imprimé comme dans Excel, avec la zone d'impression, la mise en page et les sauts de page.\nDésactivé : la chaîne intégrée ajuste chaque feuille à la largeur de la page (sauts de page conservés).",
992+
"engines.lo_sheets_hint_print": "Imprimé par LibreOffice Calc avec ses propres polices.\nDésactivé : Filee les imprime lui-même comme Excel, avec la zone d'impression, la mise en page et les sauts de page.",
991993
"engines.filee_renderer": "Utiliser le moteur de rendu Filee (aperçu)",
992994
"engines.filee_renderer_hint": "Le moteur propre à Filee met en page en PDF les HWPX, documents Word, textes, Markdown, HTML et livres numériques, à la place du rédacteur HWPX et de rhwp.\nLes fichiers contenant ce qu'il ne dessine pas encore (graphiques, texte vertical…) gardent leur parcours habituel.",
993995
"engines.package.libreoffice.name": "LibreOffice (formats anciens et rares)",

‎src/Filee.App/Assets/i18n/hi.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@
176176
"engine.markdown.description": "Markdown → HTML और सादा टेक्स्ट।\nटेक्स्ट और स्क्रिप्ट की सोर्स फ़ाइलें → UTF-8 TXT, स्क्रिप्ट चलाए बिना।",
177177
"engine.spreadsheet.name": "Spreadsheets (built-in)",
178178
"engine.spreadsheet.description": "XLSX, XLS, ODS, CSV और TSV एक-दूसरे में (XLS केवल पढ़ा जा सकता है)।\nहर शीट के लिए एक CSV।",
179+
"engine.sheet-print.name": "स्प्रेडशीट प्रिंटिंग (बिल्ट-इन)",
180+
"engine.sheet-print.description": "XLSX, XLS और ODS को Excel की तरह PDF में प्रिंट करता है, Excel या LibreOffice के बिना:\nपेज सेटअप, प्रिंट एरिया और टाइटल, पेज ब्रेक, हेडर और फ़ुटर।",
179181
"engine.ooxml.name": "Office Open XML (built-in)",
180182
"engine.ooxml.description": "मैक्रो-सक्षम फ़ाइलें और टेम्पलेट (DOCM, XLSM, PPTM, DOTX…) ↔ DOCX, XLSX, PPTX।\nमैक्रो हटा दिए जाते हैं।",
181183
"engine.hwpx-writer.name": "HWPX writer (built-in)",
@@ -970,7 +972,7 @@
970972
"engines.lo_documents": "Word दस्तावेज़ → PDF के लिए LibreOffice इस्तेमाल करें",
971973
"engines.lo_documents_hint": "Word जैसा लेआउट, चीनी और जापानी विराम-चिह्न नियमों सहित।\nबंद: बिल्ट-इन रास्ता।",
972974
"engines.lo_sheets": "स्प्रेडशीट → PDF के लिए LibreOffice इस्तेमाल करें",
973-
"engines.lo_sheets_hint": "Excel की तरह प्रिंट होता है, प्रिंट एरिया, पेज सेटअप और पेज ब्रेक के साथ।\nबंद: बिल्ट-इन रास्ता हर शीट को पेज की चौड़ाई में फ़िट करता है (पेज ब्रेक बने रहते हैं)।",
975+
"engines.lo_sheets_hint_print": "LibreOffice Calc अपने फ़ॉन्ट से प्रिंट करता है।\nबंद: Filee खुद Excel की तरह प्रिंट करता है, प्रिंट एरिया, पेज सेटअप और पेज ब्रेक के साथ।",
974976
"engines.filee_renderer": "Filee रेंडरर इस्तेमाल करें (पूर्वावलोकन)",
975977
"engines.filee_renderer_hint": "Filee का अपना इंजन HWPX, Word दस्तावेज़, टेक्स्ट, Markdown, HTML और ई-बुक को HWPX राइटर और rhwp की जगह PDF में सजाता है।\nजिन फ़ाइलों में ऐसा कुछ है जिसे यह अभी नहीं बना सकता (चार्ट, खड़ा टेक्स्ट…), वे अपने सामान्य रास्ते से बदलती हैं।",
976978
"engines.package.libreoffice.name": "LibreOffice (पुराने और दुर्लभ फ़ॉर्मैट)",

0 commit comments

Comments
 (0)