diff --git a/ci/edmtool.py b/ci/edmtool.py index ebb54b5ab..dbd6def08 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -90,7 +90,7 @@ dependencies = { "apptools", - "celiagg^=2.0.0", + "celiagg", "coverage", "Cython", "fonttools", diff --git a/kiva/celiagg.py b/kiva/celiagg.py index 05aee2947..6d39599e4 100644 --- a/kiva/celiagg.py +++ b/kiva/celiagg.py @@ -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()