From 9751f1a83023797c9068cef94d9bb6409b76058a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 11 May 2005 17:04:01 +0000 Subject: [PATCH] Don't use wx.TheFontList.FindOrCreateFont, it's way too slow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/lib/fancytext.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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() -- 2.45.2