Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e477dc

Browse files
author
Alexis Bienvenüe
committed
Reproducible PDF output: sort TTF characters
1 parent c6a4660 commit 4e477dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,8 @@ def get_char_width(charcode):
949949
rawcharprocs = ttconv.get_pdf_charprocs(
950950
filename.encode(sys.getfilesystemencoding()), glyph_ids)
951951
charprocs = {}
952-
for charname, stream in six.iteritems(rawcharprocs):
952+
for charname in sorted(rawcharprocs):
953+
stream = rawcharprocs[charname]
953954
charprocDict = {'Length': len(stream)}
954955
# The 2-byte characters are used as XObjects, so they
955956
# need extra info in their dictionary

0 commit comments

Comments
 (0)