Fix bug in LayoutEngine.calculate(...)

The problem had been that `LayoutEngine.calculate(...)` was assuming
that len(char["text"]) would always equal 1, which is not true for
ligatures.

Thanks to @samkit-jain for finding a PDF that raised the error, and to
@bpugnaire for raising issue #683.
This commit is contained in:
Jeremy Singer-Vine
2022-07-14 17:21:55 -04:00
parent fd3f5334f8
commit 12feadb8fd
3 changed files with 24 additions and 1 deletions
+6
View File
@@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/).
## [0.7.2] - [unreleased]
### Fixed
- Fix bug in `LayoutEngine.calculate(...)` when processing char objects with len>1 representations, such as ligatures. ([#683](https://github.com/jsvine/pdfplumber/issues/683))
## [0.7.1] - 2022-05-31
### Fixed