X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c53d5301b134376f49ec1296d2e4c83dae8c0a3..db679b8c836e69c111cdc31e62cf92cebe4f938f:/wxPython/wx/lib/fancytext.py diff --git a/wxPython/wx/lib/fancytext.py b/wxPython/wx/lib/fancytext.py index 0c61639f19..16e4a5e8b3 100644 --- a/wxPython/wx/lib/fancytext.py +++ b/wxPython/wx/lib/fancytext.py @@ -201,18 +201,19 @@ class Renderer: def getCurrentFont(self): font = self.fonts[-1] - return wx.TheFontList.FindOrCreateFont(font.get("size", self.defaultSize), - font.get("family", self.defaultFamily), - font.get("style", self.defaultStyle), - font.get("weight", self.defaultWeight), - encoding = font.get("encoding", self.defaultEncoding)) + return wx.Font(font.get("size", self.defaultSize), + font.get("family", self.defaultFamily), + font.get("style", self.defaultStyle), + font.get("weight",self.defaultWeight), + False, "", + font.get("encoding", self.defaultEncoding)) def getCurrentColor(self): font = self.fonts[-1] return wx.TheColourDatabase.FindColour(font.get("color", self.defaultColor)) def getCurrentPen(self): - return wx.ThePenList.FindOrCreatePen(self.getCurrentColor(), 1, wx.SOLID) + return wx.Pen(self.getCurrentColor(), 1, wx.SOLID) def renderCharacterData(self, data, x, y): raise NotImplementedError()