Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 897a3ae

Browse filesBrowse files
Eliminate line continuation character in favor of parens; enhance alignment to emphasize we're accessing different records and doing similar things to them
1 parent 4d96e60 commit 897a3ae
Copy full SHA for 897a3ae

File tree

Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,11 @@ def ttfFontProperty(font):
323323
# missing in some alternative Python implementations and we are only going
324324
# to look for ASCII substrings, where any ASCII-compatible encoding works
325325
# - or big-endian UTF-16, since important Microsoft fonts use that.
326-
sfnt2 = sfnt.get((1, 0, 0, 2), b'').decode('latin-1').lower() or \
327-
sfnt.get((3, 1, 0x0409, 2), b'').decode('utf_16_be').lower()
328-
sfnt4 = sfnt.get((1, 0, 0, 4), b'').decode('latin-1').lower() or \
329-
sfnt.get((3, 1, 0x0409, 4), b'').decode('utf_16_be').lower()
326+
sfnt2 = (sfnt.get((1, 0, 0, 2), b'').decode('latin-1').lower() or
327+
sfnt.get((3, 1, 0x0409, 2), b'').decode('utf_16_be').lower())
328+
sfnt4 = (sfnt.get((1, 0, 0, 4), b'').decode('latin-1').lower() or
329+
sfnt.get((3, 1, 0x0409, 4), b'').decode('utf_16_be').lower())
330+
330331
if sfnt4.find('oblique') >= 0:
331332
style = 'oblique'
332333
elif sfnt4.find('italic') >= 0:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.