BabelDOC 0.7.1__tar.gz → 0.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (467) hide show
  1. {babeldoc-0.7.1 → babeldoc-0.8.1}/PKG-INFO +15 -25
  2. {babeldoc-0.7.1 → babeldoc-0.8.1}/README.md +11 -11
  3. babeldoc-0.8.1/babeldoc/__init__.py +1 -0
  4. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/assets/embedding_assets_metadata.py +24 -8
  5. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/asynchronize/__init__.py +14 -9
  6. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/const.py +1 -1
  7. babeldoc-0.7.1/babeldoc/format/pdf/document_il/backend/pdf_creater.py → babeldoc-0.8.1/babeldoc/format/pdf/document_il/backend/pdf_assembler.py +171 -78
  8. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/extract_char.py +1 -1
  9. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/formular_helper.py +2 -2
  10. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/high_level.py +184 -105
  11. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/result_merger.py +38 -11
  12. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/split_manager.py +2 -2
  13. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/translation_config.py +136 -13
  14. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/main.py +54 -4
  15. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_run_context.py +5 -4
  16. babeldoc-0.8.1/babeldoc/rust_scan_service.py +726 -0
  17. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_writer_service.py +6 -2
  18. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/babeldoc_adapter.py +21 -1
  19. babeldoc-0.8.1/babeldoc/utils/priority_thread_pool_executor.py +7 -0
  20. {babeldoc-0.7.1 → babeldoc-0.8.1}/pyproject.toml +12 -23
  21. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/Cargo.lock +35 -30
  22. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/Cargo.toml +2 -2
  23. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/src/lib.rs +53 -5
  24. {babeldoc-0.7.1/rust/il_types → babeldoc-0.8.1/rust/ir}/Cargo.toml +4 -2
  25. babeldoc-0.8.1/rust/ir/schema.dsl.rs +986 -0
  26. babeldoc-0.8.1/rust/ir/src/generated.rs +8651 -0
  27. babeldoc-0.8.1/rust/ir/src/graphic_ops.rs +517 -0
  28. babeldoc-0.8.1/rust/ir/src/known_wrong.rs +523 -0
  29. babeldoc-0.8.1/rust/ir/src/lib.rs +79 -0
  30. babeldoc-0.8.1/rust/ir/src/pools.rs +366 -0
  31. babeldoc-0.8.1/rust/ir_codegen/Cargo.toml +10 -0
  32. babeldoc-0.8.1/rust/ir_codegen/src/dsl.rs +662 -0
  33. babeldoc-0.8.1/rust/ir_codegen/src/emit.rs +450 -0
  34. babeldoc-0.8.1/rust/ir_codegen/src/lib.rs +10 -0
  35. babeldoc-0.8.1/rust/ir_codegen/src/main.rs +16 -0
  36. babeldoc-0.8.1/rust/ir_codegen/src/validate.rs +447 -0
  37. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/Cargo.toml +2 -4
  38. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/expansion.rs +0 -2
  39. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/fonts/maps.rs +1 -0
  40. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/fonts.rs +13 -8
  41. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/lib.rs +783 -386
  42. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/object_numbers.rs +0 -2
  43. babeldoc-0.8.1/rust/parser_core/src/ocr_signals.rs +655 -0
  44. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/page_access.rs +0 -10
  45. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/page_rank.rs +0 -3
  46. babeldoc-0.8.1/rust/parser_core/src/pool.rs +78 -0
  47. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/projection.rs +234 -570
  48. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/tokens.rs +27 -15
  49. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/type3.rs +9 -10
  50. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/valid_text.rs +0 -2
  51. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/Cargo.toml +2 -3
  52. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/lib.rs +6 -7
  53. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/context.rs +18 -0
  54. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/mod.rs +1 -1
  55. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/shared_context.rs +59 -7
  56. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/formula_helper.rs +37 -63
  57. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/formula_patterns.rs +1 -1
  58. babeldoc-0.8.1/rust/pipeline_stages/src/shared/layout_helper.rs +1126 -0
  59. babeldoc-0.8.1/rust/pipeline_stages/src/shared/style.rs +46 -0
  60. babeldoc-0.8.1/rust/pipeline_stages/src/stages/add_debug_information.rs +380 -0
  61. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/cid_char.rs +15 -20
  62. babeldoc-0.8.1/rust/pipeline_stages/src/stages/invisible_text_filter.rs +737 -0
  63. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/layout_parser.rs +237 -186
  64. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/mod.rs +5 -1
  65. babeldoc-0.8.1/rust/pipeline_stages/src/stages/occluded_text_filter.rs +189 -0
  66. babeldoc-0.8.1/rust/pipeline_stages/src/stages/ocr_classification.rs +522 -0
  67. babeldoc-0.8.1/rust/pipeline_stages/src/stages/page_render_backend.rs +79 -0
  68. babeldoc-0.8.1/rust/pipeline_stages/src/stages/paragraph_finder.rs +936 -0
  69. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/paragraph_finder_inputs.rs +1 -1
  70. babeldoc-0.8.1/rust/pipeline_stages/src/stages/scan_detection.rs +329 -0
  71. babeldoc-0.8.1/rust/pipeline_stages/src/stages/styles_and_formulas.rs +1354 -0
  72. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/styles_and_formulas_config.rs +0 -2
  73. babeldoc-0.8.1/rust/pipeline_stages/src/stages/tree_metrics.rs +31 -0
  74. babeldoc-0.8.1/rust/pipeline_stages/src/stages/typesetting.rs +2310 -0
  75. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/glossary.rs +48 -15
  76. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/llm_only.rs +70 -6
  77. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/mod.rs +2 -2
  78. babeldoc-0.7.1/rust/p2_stages/src/translation/ordinary_translation.rs → babeldoc-0.8.1/rust/pipeline_stages/src/translation/ordinary.rs +519 -21
  79. babeldoc-0.8.1/rust/pipeline_stages/src/translation/paragraph_helpers.rs +318 -0
  80. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/python_semantics.rs +58 -3
  81. babeldoc-0.7.1/rust/p2_stages/src/translation/automatic_term_extractor.rs → babeldoc-0.8.1/rust/pipeline_stages/src/translation/term_extraction.rs +37 -2
  82. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/token_count.rs +0 -2
  83. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/Cargo.toml +7 -12
  84. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/callbacks/mod.rs +1 -1
  85. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/callbacks/progress.rs +1 -1
  86. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/font_mapper.rs +2 -2
  87. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/formula_patterns.rs +2 -2
  88. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/layout_parser.rs +23 -18
  89. babeldoc-0.8.1/rust/py_bridge/src/lib.rs +52 -0
  90. babeldoc-0.8.1/rust/py_bridge/src/occluded_text_filter.rs +290 -0
  91. babeldoc-0.8.1/rust/py_bridge/src/ocr_classification.rs +72 -0
  92. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/parser.rs +20 -71
  93. babeldoc-0.8.1/rust/py_bridge/src/pipeline_runner.rs +1761 -0
  94. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/priority_gate.rs +0 -2
  95. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/production_stages.rs +114 -67
  96. babeldoc-0.8.1/rust/py_bridge/src/scan_detection.rs +406 -0
  97. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/shared_context.rs +62 -2
  98. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/stage_error.rs +1 -1
  99. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/term_extractor.rs +9 -117
  100. babeldoc-0.8.1/rust/py_bridge/src/translation/llm_only.rs +1191 -0
  101. babeldoc-0.7.1/rust/p2_bridge/src/translation.rs → babeldoc-0.8.1/rust/py_bridge/src/translation/mod.rs +4 -1
  102. babeldoc-0.8.1/rust/py_bridge/src/translation/ordinary.rs +1931 -0
  103. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/translation_service.rs +1 -1
  104. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/writer.rs +95 -161
  105. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/writer_core/Cargo.toml +1 -3
  106. babeldoc-0.8.1/rust/writer_core/src/content.rs +3115 -0
  107. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/writer_core/src/fonts.rs +314 -93
  108. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/writer_core/src/lib.rs +3 -8
  109. babeldoc-0.8.1/rust/writer_core/src/pdf.rs +1690 -0
  110. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/writer_core/src/retry.rs +6 -2
  111. babeldoc-0.7.1/babeldoc/__init__.py +0 -1
  112. babeldoc-0.7.1/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -244
  113. babeldoc-0.7.1/babeldoc/format/pdf/document_il/il_version_1.rng +0 -670
  114. babeldoc-0.7.1/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -383
  115. babeldoc-0.7.1/babeldoc/rust_scan_service.py +0 -103
  116. babeldoc-0.7.1/babeldoc/utils/priority_thread_pool_executor.py +0 -269
  117. babeldoc-0.7.1/rust/il_types/build.rs +0 -23
  118. babeldoc-0.7.1/rust/il_types/src/lib.rs +0 -256
  119. babeldoc-0.7.1/rust/il_types/src/python_value.rs +0 -217
  120. babeldoc-0.7.1/rust/ir_core/Cargo.toml +0 -14
  121. babeldoc-0.7.1/rust/ir_core/build.rs +0 -26
  122. babeldoc-0.7.1/rust/ir_core/src/compact.rs +0 -268
  123. babeldoc-0.7.1/rust/ir_core/src/compact_values.rs +0 -153
  124. babeldoc-0.7.1/rust/ir_core/src/lib.rs +0 -1205
  125. babeldoc-0.7.1/rust/p2_bridge/build.rs +0 -30
  126. babeldoc-0.7.1/rust/p2_bridge/src/lib.rs +0 -134
  127. babeldoc-0.7.1/rust/p2_bridge/src/llm_only_translation.rs +0 -952
  128. babeldoc-0.7.1/rust/p2_bridge/src/m_transfer.rs +0 -1080
  129. babeldoc-0.7.1/rust/p2_bridge/src/ordinary_translation.rs +0 -2017
  130. babeldoc-0.7.1/rust/p2_bridge/src/python_value.rs +0 -144
  131. babeldoc-0.7.1/rust/p2_bridge/src/scan_detection.rs +0 -292
  132. babeldoc-0.7.1/rust/p2_stages/src/shared/layout_helper.rs +0 -1056
  133. babeldoc-0.7.1/rust/p2_stages/src/shared/style.rs +0 -54
  134. babeldoc-0.7.1/rust/p2_stages/src/stages/add_debug_information.rs +0 -263
  135. babeldoc-0.7.1/rust/p2_stages/src/stages/detect_scanned_file.rs +0 -233
  136. babeldoc-0.7.1/rust/p2_stages/src/stages/paragraph_finder.rs +0 -995
  137. babeldoc-0.7.1/rust/p2_stages/src/stages/styles_and_formulas.rs +0 -1190
  138. babeldoc-0.7.1/rust/p2_stages/src/stages/tree_metrics.rs +0 -111
  139. babeldoc-0.7.1/rust/p2_stages/src/stages/typesetting.rs +0 -1708
  140. babeldoc-0.7.1/rust/p2_stages/src/translation/paragraph_helpers.rs +0 -192
  141. babeldoc-0.7.1/rust/parser_core/src/pool.rs +0 -68
  142. babeldoc-0.7.1/rust/writer_core/src/codecs.rs +0 -81
  143. babeldoc-0.7.1/rust/writer_core/src/content.rs +0 -935
  144. babeldoc-0.7.1/rust/writer_core/src/pdf.rs +0 -401
  145. babeldoc-0.7.1/scripts/generate_il_rust.py +0 -229
  146. babeldoc-0.7.1/scripts/il_rust_m.py +0 -867
  147. babeldoc-0.7.1/scripts/il_rust_m_declarations.py +0 -125
  148. {babeldoc-0.7.1 → babeldoc-0.8.1}/LICENSE +0 -0
  149. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/assets/assets.py +0 -0
  150. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
  151. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/babeldoc_exception/__init__.py +0 -0
  152. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/README.md +0 -0
  153. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/__init__.py +0 -0
  154. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/base_doclayout.py +0 -0
  155. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/doclayout.py +0 -0
  156. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout.py +0 -0
  157. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout2.py +0 -0
  158. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout3.py +0 -0
  159. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout4.py +0 -0
  160. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout5.py +0 -0
  161. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout6.py +0 -0
  162. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout7.py +0 -0
  163. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout8.py +0 -0
  164. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
  165. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/__init__.py +0 -0
  166. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/__init__.py +0 -0
  167. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/babelpdf/cidfont.py +0 -0
  168. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/babelpdf/cmap.py +0 -0
  169. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/babelpdf/encoding.py +0 -0
  170. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/__init__.py +0 -0
  171. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
  172. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
  173. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/frontend/il_creater_active_support.py +0 -0
  174. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/il_version_1.py +0 -0
  175. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
  176. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
  177. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
  178. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/layout_helper.py +0 -0
  179. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
  180. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/raster_geometry.py +0 -0
  181. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
  182. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/parser_errors.py +0 -0
  183. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/parser_resource.py +0 -0
  184. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/glossary.py +0 -0
  185. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/progress_monitor.py +0 -0
  186. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_callback_bridge.py +0 -0
  187. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_debug_service.py +0 -0
  188. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_layout_service.py +0 -0
  189. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_parser_service.py +0 -0
  190. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_translation_service.py +0 -0
  191. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/__init__.py +0 -0
  192. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/__main__.py +0 -0
  193. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/protocol.py +0 -0
  194. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/runner.py +0 -0
  195. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/server.py +0 -0
  196. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/state.py +0 -0
  197. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/translator.py +0 -0
  198. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/watermark_transform.py +0 -0
  199. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/workroot.py +0 -0
  200. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/generate_cmap_metadata.py +0 -0
  201. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/generate_font_metadata.py +0 -0
  202. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/italic_assistance.py +0 -0
  203. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/italic_recognize_tool.py +0 -0
  204. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/translator/__init__.py +0 -0
  205. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/translator/cache.py +0 -0
  206. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/translator/translator.py +0 -0
  207. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/utils/__init__.py +0 -0
  208. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/utils/atomic_integer.py +0 -0
  209. {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/utils/memory.py +0 -0
  210. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/Cargo.lock +0 -0
  211. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/Cargo.toml +0 -0
  212. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/src/bin/font_core_probe.rs +0 -0
  213. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/src/missing_widths.bin +0 -0
  214. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/src/pdf_font_flags.rs +0 -0
  215. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/.gitignore +0 -0
  216. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/LICENSE-ADOBE-AFM.txt +0 -0
  217. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/LICENSE-ADOBE-CMAPS.txt +0 -0
  218. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/LICENSE-ADOBE-GLYPHLIST.txt +0 -0
  219. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/base14.json +0 -0
  220. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-EUC-H.json +0 -0
  221. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-EUC-V.json +0 -0
  222. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-H.json +0 -0
  223. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-RKSJ-H.json +0 -0
  224. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-RKSJ-V.json +0 -0
  225. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-V.json +0 -0
  226. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78ms-RKSJ-H.json +0 -0
  227. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78ms-RKSJ-V.json +0 -0
  228. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/83pv-RKSJ-H.json +0 -0
  229. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/83pv-RKSJ-V.json +0 -0
  230. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90ms-RKSJ-H.json +0 -0
  231. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90ms-RKSJ-V.json +0 -0
  232. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90msp-RKSJ-H.json +0 -0
  233. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90msp-RKSJ-V.json +0 -0
  234. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90pv-RKSJ-H.json +0 -0
  235. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90pv-RKSJ-V.json +0 -0
  236. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Add-H.json +0 -0
  237. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Add-RKSJ-H.json +0 -0
  238. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Add-RKSJ-V.json +0 -0
  239. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Add-V.json +0 -0
  240. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/B5-H.json +0 -0
  241. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/B5-V.json +0 -0
  242. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/B5pc-H.json +0 -0
  243. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/B5pc-V.json +0 -0
  244. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS-EUC-H.json +0 -0
  245. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS-EUC-V.json +0 -0
  246. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS1-H.json +0 -0
  247. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS1-V.json +0 -0
  248. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS2-H.json +0 -0
  249. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS2-V.json +0 -0
  250. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETHK-B5-H.json +0 -0
  251. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETHK-B5-V.json +0 -0
  252. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETen-B5-H.json +0 -0
  253. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETen-B5-V.json +0 -0
  254. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETenms-B5-H.json +0 -0
  255. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETenms-B5-V.json +0 -0
  256. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/EUC-H.json +0 -0
  257. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/EUC-V.json +0 -0
  258. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Ext-H.json +0 -0
  259. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Ext-RKSJ-H.json +0 -0
  260. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Ext-RKSJ-V.json +0 -0
  261. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Ext-V.json +0 -0
  262. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GB-EUC-H.json +0 -0
  263. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GB-EUC-V.json +0 -0
  264. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GB-H.json +0 -0
  265. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GB-V.json +0 -0
  266. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBK-EUC-H.json +0 -0
  267. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBK-EUC-V.json +0 -0
  268. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBK2K-H.json +0 -0
  269. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBK2K-V.json +0 -0
  270. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBKp-EUC-H.json +0 -0
  271. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBKp-EUC-V.json +0 -0
  272. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBT-EUC-H.json +0 -0
  273. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBT-EUC-V.json +0 -0
  274. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBT-H.json +0 -0
  275. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBT-V.json +0 -0
  276. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBTpc-EUC-H.json +0 -0
  277. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBTpc-EUC-V.json +0 -0
  278. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBpc-EUC-H.json +0 -0
  279. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBpc-EUC-V.json +0 -0
  280. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/H.json +0 -0
  281. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKdla-B5-H.json +0 -0
  282. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKdla-B5-V.json +0 -0
  283. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKdlb-B5-H.json +0 -0
  284. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKdlb-B5-V.json +0 -0
  285. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKgccs-B5-H.json +0 -0
  286. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKgccs-B5-V.json +0 -0
  287. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKm314-B5-H.json +0 -0
  288. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKm314-B5-V.json +0 -0
  289. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKm471-B5-H.json +0 -0
  290. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKm471-B5-V.json +0 -0
  291. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKscs-B5-H.json +0 -0
  292. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKscs-B5-V.json +0 -0
  293. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Hankaku-H.json +0 -0
  294. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Hankaku-V.json +0 -0
  295. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Hiragana-H.json +0 -0
  296. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Hiragana-V.json +0 -0
  297. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-EUC-H.json +0 -0
  298. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-EUC-V.json +0 -0
  299. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-H.json +0 -0
  300. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-Johab-H.json +0 -0
  301. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-Johab-V.json +0 -0
  302. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-V.json +0 -0
  303. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCms-UHC-H.json +0 -0
  304. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCms-UHC-HW-H.json +0 -0
  305. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCms-UHC-HW-V.json +0 -0
  306. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCms-UHC-V.json +0 -0
  307. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCpc-EUC-H.json +0 -0
  308. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCpc-EUC-V.json +0 -0
  309. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Katakana-H.json +0 -0
  310. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Katakana-V.json +0 -0
  311. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/NWP-H.json +0 -0
  312. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/NWP-V.json +0 -0
  313. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/RKSJ-H.json +0 -0
  314. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/RKSJ-V.json +0 -0
  315. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Roman-H.json +0 -0
  316. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Roman-V.json +0 -0
  317. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UCS2-H.json +0 -0
  318. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UCS2-V.json +0 -0
  319. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF16-H.json +0 -0
  320. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF16-V.json +0 -0
  321. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF32-H.json +0 -0
  322. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF32-V.json +0 -0
  323. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF8-H.json +0 -0
  324. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF8-V.json +0 -0
  325. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UCS2-H.json +0 -0
  326. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UCS2-V.json +0 -0
  327. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF16-H.json +0 -0
  328. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF16-V.json +0 -0
  329. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF32-H.json +0 -0
  330. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF32-V.json +0 -0
  331. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF8-H.json +0 -0
  332. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF8-V.json +0 -0
  333. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UCS2-H.json +0 -0
  334. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UCS2-HW-H.json +0 -0
  335. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UCS2-HW-V.json +0 -0
  336. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UCS2-V.json +0 -0
  337. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF16-H.json +0 -0
  338. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF16-V.json +0 -0
  339. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF32-H.json +0 -0
  340. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF32-V.json +0 -0
  341. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF8-H.json +0 -0
  342. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF8-V.json +0 -0
  343. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF16-H.json +0 -0
  344. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF16-V.json +0 -0
  345. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF32-H.json +0 -0
  346. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF32-V.json +0 -0
  347. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF8-H.json +0 -0
  348. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF8-V.json +0 -0
  349. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJISX0213-UTF32-H.json +0 -0
  350. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJISX0213-UTF32-V.json +0 -0
  351. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJISX02132004-UTF32-H.json +0 -0
  352. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJISX02132004-UTF32-V.json +0 -0
  353. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UCS2-H.json +0 -0
  354. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UCS2-V.json +0 -0
  355. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF16-H.json +0 -0
  356. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF16-V.json +0 -0
  357. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF32-H.json +0 -0
  358. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF32-V.json +0 -0
  359. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF8-H.json +0 -0
  360. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF8-V.json +0 -0
  361. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/V.json +0 -0
  362. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/WP-Symbol-H.json +0 -0
  363. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/WP-Symbol-V.json +0 -0
  364. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/to-unicode-Adobe-CNS1.json +0 -0
  365. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/to-unicode-Adobe-GB1.json +0 -0
  366. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/to-unicode-Adobe-Japan1.json +0 -0
  367. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/to-unicode-Adobe-Korea1.json +0 -0
  368. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/font_tables.zst +0 -0
  369. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/fontmetrics.json +0 -0
  370. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/glyphlist.json +0 -0
  371. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/latin_enc.json +0 -0
  372. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/type1_encoding.json +0 -0
  373. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/win_core.json +0 -0
  374. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/examples/object_numbers.rs +0 -0
  375. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/examples/probe_prepared_font.rs +0 -0
  376. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/font_cmap_data.rs +0 -0
  377. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/valid_categories.rs +0 -0
  378. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/tools/build_font_asset_bundle.py +0 -0
  379. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/font_mapper.rs +0 -0
  380. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/config.rs +0 -0
  381. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/run_state.rs +0 -0
  382. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/mod.rs +0 -0
  383. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/unicode.rs +0 -0
  384. {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/unicode_data.rs +0 -0
  385. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/logging.rs +0 -0
  386. {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/run_context.rs +0 -0
  387. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/rtree_compat/Cargo.toml +0 -0
  388. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/rtree_compat/src/lib.rs +0 -0
  389. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/.editorconfig +0 -0
  390. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/.gitattributes +0 -0
  391. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/.gitignore +0 -0
  392. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/BABELDOC_PATCH.md +0 -0
  393. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/CHANGELOG.md +0 -0
  394. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/Cargo.toml +0 -0
  395. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/Cargo.toml.orig +0 -0
  396. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/LICENSE +0 -0
  397. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/README.md +0 -0
  398. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/rustfmt.toml +0 -0
  399. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/bookmarks.rs +0 -0
  400. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/cmap_section.rs +0 -0
  401. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/common_data_structures/mod.rs +0 -0
  402. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/content.rs +0 -0
  403. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/creator.rs +0 -0
  404. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/datetime.rs +0 -0
  405. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/destinations.rs +0 -0
  406. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/document.rs +0 -0
  407. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/cmap.rs +0 -0
  408. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/differences.rs +0 -0
  409. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/glyphnames.rs +0 -0
  410. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/mappings.rs +0 -0
  411. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/mod.rs +0 -0
  412. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption/algorithms.rs +0 -0
  413. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption/crypt_filters.rs +0 -0
  414. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption/pkcs5.rs +0 -0
  415. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption/rc4.rs +0 -0
  416. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption.rs +0 -0
  417. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/error.rs +0 -0
  418. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/filters/mod.rs +0 -0
  419. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/filters/png.rs +0 -0
  420. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/font.rs +0 -0
  421. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/incremental_document.rs +0 -0
  422. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/lib.rs +0 -0
  423. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/load_options.rs +0 -0
  424. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/object.rs +0 -0
  425. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/object_stream.rs +0 -0
  426. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/outlines.rs +0 -0
  427. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/parser/cmap_parser.rs +0 -0
  428. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/parser/mod.rs +0 -0
  429. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/parser_aux.rs +0 -0
  430. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/processor.rs +0 -0
  431. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/reader.rs +0 -0
  432. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/reader_resource_v3_tests.rs +0 -0
  433. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/resource.rs +0 -0
  434. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/save_options.rs +0 -0
  435. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/stream_content.rs +0 -0
  436. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/toc.rs +0 -0
  437. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/writer.rs +0 -0
  438. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/xobject.rs +0 -0
  439. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/xref.rs +0 -0
  440. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/annotation.rs +0 -0
  441. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/brotli_decode.rs +0 -0
  442. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/catalog_compression_integration_test.rs +0 -0
  443. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/decompression_bomb.rs +0 -0
  444. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/decryption.rs +0 -0
  445. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/document_load_performance.rs +0 -0
  446. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/encrypted_object_stream_test.rs +0 -0
  447. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/extract_test.rs +0 -0
  448. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/font_test.rs +0 -0
  449. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/incremental_document.rs +0 -0
  450. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/linearized_objstm_test.rs +0 -0
  451. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/load_options_test.rs +0 -0
  452. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/metadata_test.rs +0 -0
  453. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/modify.rs +0 -0
  454. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/object_stream_comprehensive_test.rs +0 -0
  455. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/object_stream_edge_cases_test.rs +0 -0
  456. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/object_stream_methods_test.rs +0 -0
  457. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/object_stream_performance_test.rs +0 -0
  458. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/page_content.rs +0 -0
  459. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/resource_compat_v2.rs +0 -0
  460. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/save_options_xref_streams_test.rs +0 -0
  461. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/simple_object_stream_test.rs +0 -0
  462. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/stream_length_recovery.rs +0 -0
  463. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/trailer_reference_compression_test.rs +0 -0
  464. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/unicode.rs +0 -0
  465. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/utils.rs +0 -0
  466. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/xref_reconstruction.rs +0 -0
  467. {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/xref_stream_bounds.rs +0 -0
@@ -1,15 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BabelDOC
3
- Version: 0.7.1
3
+ Version: 0.8.1
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Operating System :: OS Independent
6
6
  Requires-Dist: configargparse>=1.7
7
7
  Requires-Dist: httpx[socks]>=0.27.0
8
- Requires-Dist: huggingface-hub>=0.27.0
9
8
  Requires-Dist: numpy>=2.0.2
10
9
  Requires-Dist: onnx>=1.21.0
11
- Requires-Dist: onnxruntime>=1.16.1,<1.24 ; python_full_version < '3.11'
12
- Requires-Dist: onnxruntime>=1.16.1 ; python_full_version >= '3.11'
10
+ Requires-Dist: onnxruntime>=1.16.1
13
11
  Requires-Dist: openai>=1.59.3
14
12
  Requires-Dist: orjson>=3.10.14
15
13
  Requires-Dist: charset-normalizer>=2.0.0
@@ -20,35 +18,27 @@ Requires-Dist: pymupdf>=1.26.7,<2
20
18
  Requires-Dist: rich>=13.9.4
21
19
  Requires-Dist: toml>=0.10.2
22
20
  Requires-Dist: tqdm>=4.67.1
23
- Requires-Dist: xsdata[cli,lxml,soap]>=24.12
21
+ Requires-Dist: xsdata>=24.12
24
22
  Requires-Dist: msgpack>=1.1.0
25
23
  Requires-Dist: pydantic>=2.10.6
26
24
  Requires-Dist: tenacity>=9.0.0
27
25
  Requires-Dist: scikit-image>=0.25.2
28
26
  Requires-Dist: freetype-py>=2.5.1
29
27
  Requires-Dist: tiktoken>=0.9.0
30
- Requires-Dist: levenshtein>=0.27.1
31
28
  Requires-Dist: opencv-python-headless>=4.10.0.84
32
- Requires-Dist: pyzstd>=0.17.0
33
29
  Requires-Dist: hyperscan>=0.7.13
34
- Requires-Dist: rtree>=1.4.0
35
30
  Requires-Dist: chardet>=5.2.0
36
31
  Requires-Dist: scipy>=1.15.3
37
- Requires-Dist: uharfbuzz>=0.50.2
38
32
  Requires-Dist: scikit-learn>=1.7.1
39
- Requires-Dist: onnxruntime-gpu>=1.16.1 ; extra == 'cuda'
40
33
  Requires-Dist: onnxruntime-directml>=1.16.1 ; extra == 'directml'
41
- Requires-Dist: memray>=1.17.1 ; extra == 'memray'
42
- Provides-Extra: cuda
43
34
  Provides-Extra: directml
44
- Provides-Extra: memray
45
35
  License-File: LICENSE
46
36
  Summary: Yet Another Document Translator
47
37
  Keywords: PDF
48
38
  Author-email: awwaawwa <aw@funstory.ai>
49
39
  Maintainer-email: awwaawwa <aw@funstory.ai>
50
40
  License-Expression: AGPL-3.0
51
- Requires-Python: >=3.10, <3.14
41
+ Requires-Python: >=3.11, <3.15
52
42
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
53
43
  Project-URL: Homepage, https://github.com/funstory-ai/BabelDOC
54
44
  Project-URL: Issues, https://github.com/funstory-ai/BabelDOC/issues
@@ -481,22 +471,22 @@ step by step.
481
471
 
482
472
  <h2 id="star_hist">Star History</h2>
483
473
 
484
- <a href="https://star-history.com/#funstory-ai/babeldoc&Date">
474
+ <a href="https://star-history.dera.page/#funstory-ai/babeldoc&type=Date">
485
475
  <picture>
486
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=funstory-ai/babeldoc&type=Date&theme=dark" />
487
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=funstory-ai/babeldoc&type=Date" />
488
- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=funstory-ai/babeldoc&type=Date"/>
476
+ <source media="(prefers-color-scheme: dark)" srcset="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date&theme=dark" />
477
+ <source media="(prefers-color-scheme: light)" srcset="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date" />
478
+ <img alt="Star History Chart" src="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date"/>
489
479
  </picture>
490
480
  </a>
491
481
 
492
- > [!WARNING]
493
- > **Important Interaction Note for `--auto-enable-ocr-workaround`:**
482
+ > [!NOTE]
483
+ > **OCR Mode (`--ocr-mode`) and Legacy Flag Precedence (v0.8.0+):**
494
484
  >
495
- > When `--auto-enable-ocr-workaround` is set to `true` (either via command line or config file):
485
+ > BabelDOC uses a unified tri-state `ocr_mode` (`"auto"`, `"on"`, `"off"`), defaulting to `"auto"`:
496
486
  >
497
- > 1. During the initial setup, the values for `ocr_workaround` and `skip_scanned_detection` will be forced to `false` by `TranslationConfig`, regardless of whether you also set `--ocr-workaround` or `--skip-scanned-detection` flags.
498
- > 2. Then, during the scanned document detection phase (`DetectScannedFile` stage):
499
- > * If the document is identified as heavily scanned (e.g., >80% scanned pages) AND `auto_enable_ocr_workaround` is `true` (i.e., `translation_config.auto_enable_ocr_workaround` is true), the system will then attempt to set both `ocr_workaround` to `true` and `skip_scanned_detection` to `true`.
487
+ > 1. `ocr_mode="auto"` (default): automatically classifies scanned / OCR text layers per paragraph, and raises `ScannedPDFError` if at least 80% of selected pages in the scan check are scanned without usable text (unless `skip_scanned_detection=True` is also set).
488
+ > 2. `ocr_mode="on"`: forces OCR handling, skips scanned-PDF rejection, and disables rich-text translation.
489
+ > 3. `ocr_mode="off"`: skips scanned-PDF rejection and disables OCR masking.
500
490
  >
501
- > This means that `--auto-enable-ocr-workaround` effectively gives the system control to enable OCR processing for scanned documents, potentially overriding manual settings for `--ocr-workaround` and `--skip_scanned_detection` based on its detection results. If the document is *not* detected as heavily scanned, then the initial `false` values for `ocr_workaround` and `skip_scanned_detection` (forced by `--auto-enable-ocr-workaround` at the `TranslationConfig` initialization stage) will remain in effect unless changed by other logic.
491
+ > When `ocr_mode` is omitted, legacy boolean flags resolve in priority order: `ocr_workaround=True` selects `"on"` (taking precedence even if `auto_enable_ocr_workaround=True` is also set), followed by `auto_enable_ocr_workaround=True` (`"auto"`), then `skip_scanned_detection=True` (`"off"`), and default `"auto"` when none are enabled.
502
492
 
@@ -426,21 +426,21 @@ step by step.
426
426
 
427
427
  <h2 id="star_hist">Star History</h2>
428
428
 
429
- <a href="https://star-history.com/#funstory-ai/babeldoc&Date">
429
+ <a href="https://star-history.dera.page/#funstory-ai/babeldoc&type=Date">
430
430
  <picture>
431
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=funstory-ai/babeldoc&type=Date&theme=dark" />
432
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=funstory-ai/babeldoc&type=Date" />
433
- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=funstory-ai/babeldoc&type=Date"/>
431
+ <source media="(prefers-color-scheme: dark)" srcset="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date&theme=dark" />
432
+ <source media="(prefers-color-scheme: light)" srcset="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date" />
433
+ <img alt="Star History Chart" src="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date"/>
434
434
  </picture>
435
435
  </a>
436
436
 
437
- > [!WARNING]
438
- > **Important Interaction Note for `--auto-enable-ocr-workaround`:**
437
+ > [!NOTE]
438
+ > **OCR Mode (`--ocr-mode`) and Legacy Flag Precedence (v0.8.0+):**
439
439
  >
440
- > When `--auto-enable-ocr-workaround` is set to `true` (either via command line or config file):
440
+ > BabelDOC uses a unified tri-state `ocr_mode` (`"auto"`, `"on"`, `"off"`), defaulting to `"auto"`:
441
441
  >
442
- > 1. During the initial setup, the values for `ocr_workaround` and `skip_scanned_detection` will be forced to `false` by `TranslationConfig`, regardless of whether you also set `--ocr-workaround` or `--skip-scanned-detection` flags.
443
- > 2. Then, during the scanned document detection phase (`DetectScannedFile` stage):
444
- > * If the document is identified as heavily scanned (e.g., >80% scanned pages) AND `auto_enable_ocr_workaround` is `true` (i.e., `translation_config.auto_enable_ocr_workaround` is true), the system will then attempt to set both `ocr_workaround` to `true` and `skip_scanned_detection` to `true`.
442
+ > 1. `ocr_mode="auto"` (default): automatically classifies scanned / OCR text layers per paragraph, and raises `ScannedPDFError` if at least 80% of selected pages in the scan check are scanned without usable text (unless `skip_scanned_detection=True` is also set).
443
+ > 2. `ocr_mode="on"`: forces OCR handling, skips scanned-PDF rejection, and disables rich-text translation.
444
+ > 3. `ocr_mode="off"`: skips scanned-PDF rejection and disables OCR masking.
445
445
  >
446
- > This means that `--auto-enable-ocr-workaround` effectively gives the system control to enable OCR processing for scanned documents, potentially overriding manual settings for `--ocr-workaround` and `--skip_scanned_detection` based on its detection results. If the document is *not* detected as heavily scanned, then the initial `false` values for `ocr_workaround` and `skip_scanned_detection` (forced by `--auto-enable-ocr-workaround` at the `TranslationConfig` initialization stage) will remain in effect unless changed by other logic.
446
+ > When `ocr_mode` is omitted, legacy boolean flags resolve in priority order: `ocr_workaround=True` selects `"on"` (taking precedence even if `auto_enable_ocr_workaround=True` is also set), followed by `auto_enable_ocr_workaround=True` (`"auto"`), then `skip_scanned_detection=True` (`"off"`), and default `"auto"` when none are enabled.
@@ -0,0 +1 @@
1
+ __version__ = "0.8.1"
@@ -16,17 +16,33 @@ FONT_METADATA_URL = {
16
16
  }
17
17
 
18
18
  FONT_URL_BY_UPSTREAM = {
19
- "github": lambda name: f"https://raw.githubusercontent.com/funstory-ai/BabelDOC-Assets/refs/heads/main/fonts/{name}",
20
- "huggingface": lambda name: f"https://huggingface.co/datasets/awwaawwa/BabelDOC-Assets/resolve/main/fonts/{name}?download=true",
21
- "hf-mirror": lambda name: f"https://hf-mirror.com/datasets/awwaawwa/BabelDOC-Assets/resolve/main/fonts/{name}?download=true",
22
- "modelscope": lambda name: f"https://www.modelscope.cn/datasets/awwaawwa/BabelDOCAssets/resolve/master/fonts/{name}",
19
+ "github": lambda name: (
20
+ f"https://raw.githubusercontent.com/funstory-ai/BabelDOC-Assets/refs/heads/main/fonts/{name}"
21
+ ),
22
+ "huggingface": lambda name: (
23
+ f"https://huggingface.co/datasets/awwaawwa/BabelDOC-Assets/resolve/main/fonts/{name}?download=true"
24
+ ),
25
+ "hf-mirror": lambda name: (
26
+ f"https://hf-mirror.com/datasets/awwaawwa/BabelDOC-Assets/resolve/main/fonts/{name}?download=true"
27
+ ),
28
+ "modelscope": lambda name: (
29
+ f"https://www.modelscope.cn/datasets/awwaawwa/BabelDOCAssets/resolve/master/fonts/{name}"
30
+ ),
23
31
  }
24
32
 
25
33
  CMAP_URL_BY_UPSTREAM = {
26
- "github": lambda name: f"https://raw.githubusercontent.com/funstory-ai/BabelDOC-Assets/refs/heads/main/cmap/{name}",
27
- "huggingface": lambda name: f"https://huggingface.co/datasets/awwaawwa/BabelDOC-Assets/resolve/main/cmap/{name}?download=true",
28
- "hf-mirror": lambda name: f"https://hf-mirror.com/datasets/awwaawwa/BabelDOC-Assets/resolve/main/cmap/{name}?download=true",
29
- "modelscope": lambda name: f"https://www.modelscope.cn/datasets/awwaawwa/BabelDOCAssets/resolve/master/cmap/{name}",
34
+ "github": lambda name: (
35
+ f"https://raw.githubusercontent.com/funstory-ai/BabelDOC-Assets/refs/heads/main/cmap/{name}"
36
+ ),
37
+ "huggingface": lambda name: (
38
+ f"https://huggingface.co/datasets/awwaawwa/BabelDOC-Assets/resolve/main/cmap/{name}?download=true"
39
+ ),
40
+ "hf-mirror": lambda name: (
41
+ f"https://hf-mirror.com/datasets/awwaawwa/BabelDOC-Assets/resolve/main/cmap/{name}?download=true"
42
+ ),
43
+ "modelscope": lambda name: (
44
+ f"https://www.modelscope.cn/datasets/awwaawwa/BabelDOCAssets/resolve/master/cmap/{name}"
45
+ ),
30
46
  }
31
47
 
32
48
  DOC_LAYOUT_ONNX_MODEL_URL = {
@@ -1,5 +1,5 @@
1
1
  import asyncio
2
- import time
2
+ import threading
3
3
 
4
4
 
5
5
  class Args:
@@ -13,6 +13,8 @@ class AsyncCallback:
13
13
  self.queue = asyncio.Queue()
14
14
  self.finished = False
15
15
  self.loop = asyncio.get_event_loop()
16
+ self._finish_lock = threading.Lock()
17
+ self._finish_scheduled = False
16
18
 
17
19
  def step_callback(self, *args, **kwargs):
18
20
  # Whenever a step is called, add to the queue but don't set finished to True, so __anext__ will continue
@@ -22,15 +24,18 @@ class AsyncCallback:
22
24
  # https://stackoverflow.com/a/49912853/2148718
23
25
  self.loop.call_soon_threadsafe(self.queue.put_nowait, args)
24
26
 
25
- # Add a small delay to release the GIL, ensuring the event loop has time to process messages
26
- time.sleep(0.01)
27
-
28
27
  def finished_callback(self, *args, **kwargs):
29
- # Whenever a finished is called, add to the queue as with step, but also set finished to True, so __anext__
30
- # will terminate after processing the remaining items
31
- if self.finished:
32
- return
33
- self.step_callback(*args, **kwargs)
28
+ # Enqueue the terminal event and expose finished together on the event loop. Otherwise a
29
+ # consumer can observe finished with an empty queue before the scheduled enqueue runs.
30
+ with self._finish_lock:
31
+ if self._finish_scheduled:
32
+ return
33
+ self._finish_scheduled = True
34
+ terminal_args = Args(args, kwargs)
35
+ self.loop.call_soon_threadsafe(self._enqueue_finish, terminal_args)
36
+
37
+ def _enqueue_finish(self, args):
38
+ self.queue.put_nowait(args)
34
39
  self.finished = True
35
40
 
36
41
  def __await__(self):
@@ -6,7 +6,7 @@ import subprocess
6
6
  import threading
7
7
  from pathlib import Path
8
8
 
9
- __version__ = "0.7.1"
9
+ __version__ = "0.8.1"
10
10
 
11
11
  CACHE_FOLDER = Path.home() / ".cache" / "babeldoc"
12
12
 
@@ -1,4 +1,3 @@
1
- import io
2
1
  import itertools
3
2
  import logging
4
3
  import os
@@ -8,7 +7,6 @@ import unicodedata
8
7
  from multiprocessing import Process
9
8
  from pathlib import Path
10
9
 
11
- import freetype
12
10
  import pymupdf
13
11
 
14
12
  from babeldoc.assets.embedding_assets_metadata import FONT_NAMES
@@ -22,28 +20,35 @@ _EXTGSTATE_USAGE_RE = re.compile(rb"/([!#$%&'*+,\-.0-9:;=?@A-Z\\^_`a-z{|}~]+)\s+
22
20
  _SHADING_USAGE_RE = re.compile(rb"/([!#$%&'*+,\-.0-9:;=?@A-Z\\^_`a-z{|}~]+)\s+sh\b")
23
21
 
24
22
 
25
- def to_int(src):
26
- return int(re.search(r"\d+", src).group(0))
23
+ _BFRANGE_BLOCK_RE = re.compile(
24
+ rb"(?:^|\s)beginbfrange\b(?P<r>.*?)(?:^|\s)endbfrange\b",
25
+ re.DOTALL,
26
+ )
27
+ _BFRANGE_ENTRY_RE = re.compile(
28
+ rb"<(?P<start>[0-9a-fA-F]+)>\s*<(?P<stop>[0-9a-fA-F]+)>\s*(?:\[(?P<arr>[^\]]*)\]|<(?P<dst>[0-9a-fA-F]+)>)"
29
+ )
30
+ _BFCHAR_BLOCK_RE = re.compile(
31
+ rb"(?:^|\s)beginbfchar\b(?P<c>.*?)(?:^|\s)endbfchar\b",
32
+ re.DOTALL,
33
+ )
34
+ _HEX_TOKEN_RE = re.compile(rb"<([0-9a-fA-F]+)>")
27
35
 
28
36
 
29
- def parse_mapping(text):
30
- mapping = []
31
- for x in re.finditer(rb"<(?P<num>[a-fA-F0-9]+)>", text):
32
- mapping.append(int(x.group("num"), 16))
33
- return mapping
37
+ def to_int(src):
38
+ return int(re.search(r"\d+", src).group(0))
34
39
 
35
40
 
36
41
  def apply_normalization(cmap, gid, code):
37
- need = False
38
- if 0x2F00 <= code <= 0x2FD5: # Kangxi Radicals
39
- need = True
40
- if 0xF900 <= code <= 0xFAFF: # CJK Compatibility Ideographs
41
- need = True
42
- if need:
43
- norm = unicodedata.normalize("NFD", chr(code))
44
- cmap[gid] = ord(norm)
45
- else:
46
- cmap[gid] = code
42
+ if (
43
+ 0x2F00 <= code <= 0x2FD5
44
+ or 0xF900 <= code <= 0xFAFF
45
+ or 0x2F800 <= code <= 0x2FA1F
46
+ ):
47
+ norm = unicodedata.normalize("NFKC", chr(code))
48
+ if len(norm) == 1:
49
+ cmap[gid] = ord(norm)
50
+ return
51
+ cmap[gid] = code
47
52
 
48
53
 
49
54
  def batched(iterable, n, *, strict=False):
@@ -57,41 +62,102 @@ def batched(iterable, n, *, strict=False):
57
62
  yield batch
58
63
 
59
64
 
60
- def update_tounicode_cmap_pair(cmap, data):
61
- for start, stop, value in batched(data, 3):
62
- for gid in range(start, stop + 1):
63
- code = value + gid - start
64
- apply_normalization(cmap, gid, code)
65
+ def _parse_cmap_dst(hex_bytes):
66
+ if len(hex_bytes) <= 4:
67
+ return int(hex_bytes, 16)
68
+ if 5 <= len(hex_bytes) <= 6:
69
+ val = int(hex_bytes, 16)
70
+ if 0x10000 <= val <= 0x10FFFF:
71
+ return val
72
+ if len(hex_bytes) == 8:
73
+ try:
74
+ decoded = bytes.fromhex(hex_bytes.decode("ascii")).decode(
75
+ "utf-16-be", errors="strict"
76
+ )
77
+ except UnicodeDecodeError:
78
+ decoded = ""
79
+ if len(decoded) == 1:
80
+ return ord(decoded)
81
+ return hex_bytes.decode("ascii").lower()
82
+
83
+
84
+ def _increment_multicode_bfrange(dst: str, offset: int) -> str | None:
85
+ if len(dst) < 4 or len(dst) % 4 != 0:
86
+ return None
87
+ last_unit = int(dst[-4:], 16)
88
+ new_unit = last_unit + offset
89
+ if 0xD800 <= last_unit <= 0xDBFF:
90
+ return None
91
+ if 0xDC00 <= last_unit <= 0xDFFF:
92
+ if new_unit > 0xDFFF:
93
+ return None
94
+ elif new_unit > 0xFFFF or (last_unit < 0xD800 <= new_unit):
95
+ return None
96
+ return f"{dst[:-4]}{new_unit:04x}"
65
97
 
66
98
 
67
- def update_tounicode_cmap_code(cmap, data):
68
- for gid, code in batched(data, 2):
69
- apply_normalization(cmap, gid, code)
99
+ def _store_cmap_entry(cmap, gid, dst):
100
+ if isinstance(dst, int):
101
+ apply_normalization(cmap, gid, dst)
102
+ else:
103
+ cmap[gid] = dst
70
104
 
71
105
 
72
106
  def parse_tounicode_cmap(data):
107
+ cleaned = re.sub(rb"%[^\r\n]*", b"", data)
108
+ bfrange_blocks = list(_BFRANGE_BLOCK_RE.finditer(cleaned))
109
+ bfchar_blocks = list(_BFCHAR_BLOCK_RE.finditer(cleaned))
110
+ if len(bfrange_blocks) != len(
111
+ re.findall(rb"(?:^|\s)beginbfrange\b", cleaned)
112
+ ) or len(bfchar_blocks) != len(re.findall(rb"(?:^|\s)beginbfchar\b", cleaned)):
113
+ return None
114
+
73
115
  cmap = {}
74
- for x in re.finditer(
75
- rb"\s+beginbfrange\s*(?P<r>(<[0-9a-fA-F]+>\s*)+)endbfrange\s+", data
76
- ):
77
- update_tounicode_cmap_pair(cmap, parse_mapping(x.group("r")))
78
- for x in re.finditer(
79
- rb"\s+beginbfchar\s*(?P<c>(<[0-9a-fA-F]+>\s*)+)endbfchar", data
80
- ):
81
- update_tounicode_cmap_code(cmap, parse_mapping(x.group("c")))
116
+ for x in bfrange_blocks:
117
+ body = x.group("r")
118
+ if _BFRANGE_ENTRY_RE.sub(b"", body).strip():
119
+ return None
120
+ for entry in _BFRANGE_ENTRY_RE.finditer(body):
121
+ start = int(entry.group("start"), 16)
122
+ stop = int(entry.group("stop"), 16)
123
+ if stop < start:
124
+ return None
125
+ arr = entry.group("arr")
126
+ if arr is not None:
127
+ if _HEX_TOKEN_RE.sub(b"", arr).strip():
128
+ return None
129
+ for offset, dst_hex in enumerate(_HEX_TOKEN_RE.findall(arr)):
130
+ gid = start + offset
131
+ if gid > stop:
132
+ break
133
+ _store_cmap_entry(cmap, gid, _parse_cmap_dst(dst_hex))
134
+ else:
135
+ dst = _parse_cmap_dst(entry.group("dst"))
136
+ if isinstance(dst, int):
137
+ if dst + stop - start > 0x10FFFF:
138
+ return None
139
+ for gid in range(start, stop + 1):
140
+ apply_normalization(cmap, gid, dst + gid - start)
141
+ elif start == stop:
142
+ cmap[start] = dst
143
+ else:
144
+ for gid in range(start, stop + 1):
145
+ incremented = _increment_multicode_bfrange(dst, gid - start)
146
+ if incremented is None:
147
+ return None
148
+ cmap[gid] = incremented
149
+ for x in bfchar_blocks:
150
+ body = x.group("c")
151
+ if _HEX_TOKEN_RE.sub(b"", body).strip():
152
+ return None
153
+ tokens = _HEX_TOKEN_RE.findall(body)
154
+ if len(tokens) % 2 != 0:
155
+ return None
156
+ for gid_hex, dst_hex in batched(tokens, 2):
157
+ _store_cmap_entry(cmap, int(gid_hex, 16), _parse_cmap_dst(dst_hex))
82
158
  return cmap
83
159
 
84
160
 
85
- def parse_truetype_data(data):
86
- glyph_in_use = []
87
- face = freetype.Face(io.BytesIO(data))
88
- for i in range(face.num_glyphs):
89
- face.load_glyph(i)
90
- if face.glyph.outline.contours:
91
- glyph_in_use.append(i)
92
- return glyph_in_use
93
-
94
-
95
161
  TOUNICODE_HEAD = """\
96
162
  /CIDInit /ProcSet findresource begin
97
163
  12 dict begin
@@ -110,16 +176,15 @@ end
110
176
  end"""
111
177
 
112
178
 
113
- def make_tounicode(cmap, used):
114
- short = []
115
- for x in used:
116
- if x in cmap:
117
- short.append((x, cmap[x]))
179
+ def make_tounicode(cmap):
180
+ short = sorted(cmap.items())
118
181
  line = [TOUNICODE_HEAD]
119
182
  for block in batched(short, 100):
120
183
  line.append(f"{len(block)} beginbfchar")
121
184
  for glyph, code in block:
122
- if code < 0x10000:
185
+ if isinstance(code, str):
186
+ line.append(f"<{glyph:04x}><{code}>")
187
+ elif code < 0x10000:
123
188
  line.append(f"<{glyph:04x}><{code:04x}>")
124
189
  else:
125
190
  code -= 0x10000
@@ -136,13 +201,11 @@ def reproduce_one_font(doc, index):
136
201
  f = doc.xref_get_key(index, "DescendantFonts")
137
202
  if m[0] == "xref" and f[0] == "array":
138
203
  mi = to_int(m[1])
139
- fi = to_int(f[1])
140
- ff = doc.xref_get_key(fi, "FontDescriptor/FontFile2")
141
204
  ms = doc.xref_stream(mi)
142
- fs = doc.xref_stream(to_int(ff[1]))
143
205
  cmap = parse_tounicode_cmap(ms)
144
- used = parse_truetype_data(fs)
145
- text = make_tounicode(cmap, used)
206
+ if not cmap:
207
+ return
208
+ text = make_tounicode(cmap)
146
209
  doc.update_stream(mi, bytes(text, "U8"))
147
210
 
148
211
 
@@ -153,7 +216,8 @@ def reproduce_cmap(doc):
153
216
  try:
154
217
  font_list = page.get_fonts()
155
218
  for font in font_list:
156
- if font[1] == "ttf" and font[3] in FONT_NAMES and ".ttf" in font[4]:
219
+ base_font = font[3].split("+", 1)[-1]
220
+ if font[1] == "ttf" and base_font in FONT_NAMES and ".ttf" in font[4]:
157
221
  font_set.add(font)
158
222
  except Exception as e:
159
223
  logger.error(f"Error in getting page fonts: {e}")
@@ -219,7 +283,7 @@ def _save_pdf_clean_process(
219
283
  os._exit(1)
220
284
 
221
285
 
222
- class PDFCreater:
286
+ class PdfAssembler:
223
287
  @staticmethod
224
288
  def _parse_xref_ref(value: str) -> int | None:
225
289
  match = re.match(r"^\s*(\d+)\s+0\s+R\s*$", value)
@@ -256,15 +320,6 @@ class PDFCreater:
256
320
  name: str,
257
321
  resource_ref: str,
258
322
  ) -> None:
259
- resource_key = f"Resources/{resource_kind}/{name}"
260
- try:
261
- pdf.xref_set_key(target_xref, resource_key, resource_ref)
262
- return
263
- except Exception as exc:
264
- if "has indirects" not in str(exc):
265
- raise
266
- direct_set_error = exc
267
-
268
323
  resources_type, resources_value = pdf.xref_get_key(
269
324
  target_xref,
270
325
  "Resources",
@@ -272,18 +327,32 @@ class PDFCreater:
272
327
  resources_xref = (
273
328
  cls._parse_xref_ref(resources_value) if resources_type == "xref" else None
274
329
  )
275
- if resources_xref is None:
276
- raise direct_set_error
277
-
278
- kind_type, kind_value = pdf.xref_get_key(resources_xref, resource_kind)
279
- kind_xref = cls._parse_xref_ref(kind_value) if kind_type == "xref" else None
280
- if kind_xref is not None:
281
- pdf.xref_set_key(kind_xref, name, resource_ref)
330
+ if resources_xref is not None:
331
+ kind_type, kind_value = pdf.xref_get_key(resources_xref, resource_kind)
332
+ kind_xref = cls._parse_xref_ref(kind_value) if kind_type == "xref" else None
333
+ if kind_xref is not None:
334
+ pdf.xref_set_key(kind_xref, name, resource_ref)
335
+ return
336
+ pdf.xref_set_key(
337
+ resources_xref,
338
+ f"{resource_kind}/{name}",
339
+ resource_ref,
340
+ )
282
341
  return
283
342
 
343
+ if resources_type == "dict":
344
+ kind_type, kind_value = pdf.xref_get_key(
345
+ target_xref,
346
+ f"Resources/{resource_kind}",
347
+ )
348
+ kind_xref = cls._parse_xref_ref(kind_value) if kind_type == "xref" else None
349
+ if kind_xref is not None:
350
+ pdf.xref_set_key(kind_xref, name, resource_ref)
351
+ return
352
+
284
353
  pdf.xref_set_key(
285
- resources_xref,
286
- f"{resource_kind}/{name}",
354
+ target_xref,
355
+ f"Resources/{resource_kind}/{name}",
287
356
  resource_ref,
288
357
  )
289
358
 
@@ -566,7 +635,7 @@ class PDFCreater:
566
635
  timeout: int = 120,
567
636
  tag: str = "",
568
637
  ) -> bool:
569
- """Save a PDF document with a timeout for the clean=True operation.
638
+ """Save a PDF document, isolating clean=True in a subprocess with timeout.
570
639
 
571
640
  Args:
572
641
  pdf: The PDF document object
@@ -580,8 +649,32 @@ class PDFCreater:
580
649
  timeout: Timeout in seconds (default: 2 minutes)
581
650
 
582
651
  Returns:
583
- True if saved with clean=True successfully, False if fallback to clean=False was used
652
+ True if saved with clean=True successfully, False if fallback or clean=False was used
584
653
  """
654
+ if not clean:
655
+ out_path = Path(output_path)
656
+ tmp_path = out_path.with_name(f".{out_path.name}.tmp.{os.getpid()}")
657
+ try:
658
+ try:
659
+ pdf.save(
660
+ str(tmp_path),
661
+ garbage=garbage,
662
+ deflate=deflate,
663
+ clean=False,
664
+ deflate_fonts=deflate_fonts,
665
+ linear=linear,
666
+ )
667
+ except Exception as e:
668
+ logger.error(f"Error in direct save with clean=False: {e}")
669
+ if tmp_path.exists():
670
+ tmp_path.unlink()
671
+ pdf.save(str(tmp_path))
672
+ tmp_path.replace(out_path)
673
+ finally:
674
+ if tmp_path.exists():
675
+ tmp_path.unlink()
676
+ return False
677
+
585
678
  # Create temporary file paths
586
679
  temp_input = str(
587
680
  translation_config.get_working_file_path(f"temp_save_input_{tag}.pdf")
@@ -726,7 +726,7 @@ def draw_clustered_lines_to_image(
726
726
  def main(argv: list[str] | None = None):
727
727
  logging.basicConfig(level=logging.INFO, handlers=[RichHandler()])
728
728
  parser = argparse.ArgumentParser(
729
- description="Agent-only debug helper: extract native-parser character boxes and clustered line images."
729
+ description="Debug helper: extract native-parser character boxes and clustered line images."
730
730
  )
731
731
  parser.add_argument("pdf", nargs="+", help="PDF path(s) to inspect.")
732
732
  parser.add_argument("--pages", help="Optional BabelDOC page range, e.g. 1-3.")
@@ -238,8 +238,8 @@ def is_formulas_font(font_name: str, formular_font_pattern: str | None) -> bool:
238
238
  r"|.*LatinModernMath-Regular.*"
239
239
  r"|.*Latin Modern Math.*"
240
240
  r"|.*Luciole.*"
241
- r"|.*NewCM.*"
242
- r"|.*NewComputerModern.*"
241
+ r"|.*NewCMMath.*"
242
+ r"|.*NewComputerModernMath.*"
243
243
  r"|.*OldStandard-Math.*"
244
244
  r"|.*STIXMath-Regular.*"
245
245
  r"|.*STIX Math.*"