Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/edmtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

dependencies = {
"apptools",
"celiagg^=2.0.0",
"celiagg",
"coverage",
"Cython",
"fonttools",
Expand Down
10 changes: 9 additions & 1 deletion kiva/celiagg.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,16 @@ def set_font(self, font):
""" Set the font for the current graphics context.
"""
if sys.platform in ('win32', 'cygwin'):
# Have to pass weight and italic on Win32
italic = (font.style in (constants.ITALIC, constants.BOLD_ITALIC))
weight = agg.FontWeight.Regular
if font.style in (constants.BOLD, constants.BOLD_ITALIC):
weight = agg.FontWeight.Bold

# Win32 font selection is handled by the OS
self.font = agg.Font(font.findfontname(), font.size)
self.font = agg.Font(
font.findfontname(), font.size, weight, italic
)
else:
# FreeType font selection is handled by kiva
spec = font.findfont()
Expand Down