So I have a tricky problem that I need an efficient solution to. I need to be able to apply a product-wide zoom to my application. That part isn't too hard, everything gets font sizes from the application style sheet, or asks a helper class for its font, so I can just scale those up based on a zoom factor.

The problem is that I have text fields and tables where the user is able to alter font sizes, and they can apply a larger font to individual words/characters. So is there any simple way that I can maybe change the scaling factor for point size fonts or something?

The solution I can see is scanning through the various QTextDocuments when they are painted and watch for where the font size changes and alter the document. It seems like this would be expensive though.

Any ideas from the community?