Skip to content

Commit

Permalink
Merge pull request #141 from funstory-ai/fix/skip-zero-font-size-chars
Browse files Browse the repository at this point in the history
feat(il_creater): Skip characters with zero font size during IL creation
  • Loading branch information
awwaawwa authored Mar 9, 2025
2 parents 45abc72 + 031adef commit 1d6b06b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions babeldoc/document_il/frontend/il_creater.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ def on_lt_char(self, char: LTChar):
pdf_style=pdf_style,
xobj_id=char.xobj_id,
)
if pdf_style.font_size == 0.0:
logger.warning(
"Font size is 0.0 for character %s. Skip it.",
char_unicode,
)
return
self.current_page.pdf_character.append(pdf_char)

def create_il(self):
Expand Down

0 comments on commit 1d6b06b

Please sign in to comment.