Skip to content

Commit

Permalink
Fix TypeError when getting default width of font (#772)
Browse files Browse the repository at this point in the history
* Issue #720

resolve1 when getting the default width.

* Add CHANGELOG.md

Co-authored-by: Pieter Marsman <[email protected]>
  • Loading branch information
gosiafilipek and pietermarsman authored Jun 25, 2022
1 parent 6cbee25 commit 1044fc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed

- Sphinx errors during building of documentation ([#760](https://github.com/pdfminer/pdfminer.six/pull/760))
- `TypeError` when getting default width of font ([#720](https://github.com/pdfminer/pdfminer.six/issues/720))

### Deprecated

Expand Down
1 change: 1 addition & 0 deletions pdfminer/pdffont.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@ def __init__(
self.default_width = num_value(descriptor.get("MissingWidth", 0))
else:
self.default_width = default_width
self.default_width = resolve1(self.default_width)
self.leading = num_value(descriptor.get("Leading", 0))
self.bbox = cast(
Rect, list_value(resolve_all(descriptor.get("FontBBox", (0, 0, 0, 0))))
Expand Down

0 comments on commit 1044fc0

Please sign in to comment.