Skip to content

Commit

Permalink
Font.php: refined wording in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
k00ni authored Oct 2, 2023
1 parent 8dbfcd1 commit 468cb20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Smalot/PdfParser/Font.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public function calculateTextWidth(string $text, array &$missing = null): ?float
$index_map = array_flip($this->table);
$details = $this->getDetails();

// TODO: Temporary fix, in the rare case the Widths-key is not set in $details array.
// Usually, Widths key is set in $details array, but if it isn't use an empty array instead.
$widths = $details['Widths'] ?? [];

// Widths array is zero indexed but table is not. We must map them based on FirstChar and LastChar
Expand Down

0 comments on commit 468cb20

Please sign in to comment.