Python Forum
[PyQt] PyQT Problems with multiple fonts
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] PyQT Problems with multiple fonts
#3
(Feb-12-2023, 06:39 PM)DrakeSoft Wrote: I have worked around the issue for now with an ugly hack

    def removeMultipleFonts(self):
        html = self.editor.document().toHtml() 
        htmlTransformed = re.sub(r"(font-family:)('.+'),('.+')", r'\1\3', html)
        self.editor.document().setHtml(htmlTransformed)
geometry dash

Is seems to resolve the issue. I invoke this on changing font and saving the file.

That is the problem that I am having as well. I do not know how to find a solution to this problem. It was you who provided the solution. The problem has been repaired by me. I am grateful to you.
Reply


Messages In This Thread
PyQT Problems with multiple fonts - by DrakeSoft - Feb-10-2023, 02:21 PM
RE: PyQT Problems with multiple fonts - by wilkinsonwilfrid - Feb-21-2024, 04:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] proportional fonts DPaul 3 1,384 Aug-18-2022, 05:43 AM
Last Post: DPaul
  [Tkinter] Custom Fonts GalaxyCoyote 1 4,845 Dec-25-2019, 06:56 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020