Skip to content

Commit 93f907d

Browse files
committed
MAINT: Remove silly mistake introduced with 0431f77
1 parent f5a20bd commit 93f907d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pypdf/generic/_appearance_stream.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ def __init__(
392392

393393
font_glyph_byte_map: dict[str, bytes]
394394
if isinstance(font.encoding, str):
395-
font_glyph_byte_map = {}
396-
for key, value in font.character_map.items():
397-
font_glyph_byte_map[value] = key.encode(font.encoding)
395+
font_glyph_byte_map = {
396+
v: k.encode(font.encoding) for k, v in font.character_map.items()
397+
}
398398
else:
399399
font_glyph_byte_map = {v: bytes((k,)) for k, v in font.encoding.items()}
400400
font_encoding_rev = {v: bytes((k,)) for k, v in font.encoding.items()}

0 commit comments

Comments
 (0)