Skip to content

Commit

Permalink
Remove always true LTChar.is_compatible (#887)
Browse files Browse the repository at this point in the history
Co-authored-by: Pieter Marsman <[email protected]>
weartist and pietermarsman authored Jan 1, 2024
1 parent 95b9f55 commit 092e477
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pdfminer/layout.py
Original file line number Diff line number Diff line change
@@ -422,10 +422,6 @@ def __repr__(self) -> str:
def get_text(self) -> str:
return self._text

def is_compatible(self, obj: object) -> bool:
"""Returns True if two characters can coexist in the same line."""
return True


LTItemT = TypeVar("LTItemT", bound=LTItem)

@@ -770,8 +766,7 @@ def group_objects(
# |<--->|
# (char_margin)
halign = (
obj0.is_compatible(obj1)
and obj0.is_voverlap(obj1)
obj0.is_voverlap(obj1)
and min(obj0.height, obj1.height) * laparams.line_overlap
< obj0.voverlap(obj1)
and obj0.hdistance(obj1)
@@ -794,7 +789,6 @@ def group_objects(
# (line_overlap)
valign = (
laparams.detect_vertical
and obj0.is_compatible(obj1)
and obj0.is_hoverlap(obj1)
and min(obj0.width, obj1.width) * laparams.line_overlap
< obj0.hoverlap(obj1)

0 comments on commit 092e477

Please sign in to comment.