Skip to content

Commit 85d0f57

Browse files
committed
Sets default cwidth to half the font size
1 parent ffdcec6 commit 85d0f57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymupdf4llm/pymupdf4llm/helpers/pymupdf_rag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def write_text(
593593
span0["text"]
594594
)
595595
if cwidth == 0.0:
596-
cwidth = 5.0
596+
cwidth = span0["size"] * 0.5
597597
text = " " * int(round(dist / cwidth)) + text
598598
out_string += text
599599
if not code:

0 commit comments

Comments
 (0)