Skip to content

Fix font selection in the QPainter backend#641

Merged
jwiggins merged 1 commit into
masterfrom
fix/qpainter-select-font
Mar 1, 2021
Merged

Fix font selection in the QPainter backend#641
jwiggins merged 1 commit into
masterfrom
fix/qpainter-select-font

Conversation

@jwiggins
Copy link
Copy Markdown
Member

This is a bit of a drive-by fix. While testing #605 and comparing to the kiva.qpainter backend, I realized that it was ignoring bold and italic preferences for fonts. This corrects that, such that the style attribute of a Font is now honored.

@jwiggins jwiggins force-pushed the fix/qpainter-select-font branch from a191049 to 17cf0fd Compare February 26, 2021 16:06
Comment thread kiva/qpainter.py
# ----------------------------------------------------------------

def select_font(self, name, size, textEncoding):
def select_font(self, name, size, style="regular", encoding=None):
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is the signature from AbstractGraphicsContext

@rahulporuri rahulporuri self-requested a review March 1, 2021 11:37
Copy link
Copy Markdown
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jwiggins jwiggins merged commit 7174a1c into master Mar 1, 2021
@jwiggins jwiggins deleted the fix/qpainter-select-font branch March 1, 2021 13:39
@jwiggins
Copy link
Copy Markdown
Member Author

jwiggins commented Mar 1, 2021

Thanks for the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants