diff --git a/lib/matplotlib/type1font.py b/lib/matplotlib/type1font.py index b414b8dfaaa7..b161b53ee8c8 100644 --- a/lib/matplotlib/type1font.py +++ b/lib/matplotlib/type1font.py @@ -306,8 +306,7 @@ def suppress(tokens): b'/FontMatrix': replace(fontmatrix), b'/UniqueID': suppress} - while True: - token, value = next(tokens) + for token, value in tokens: if token is cls._name and value in table: for value in table[value](itertools.chain([(token, value)], tokens)):