When you say it’s slow to open, that really could be anything, so please profile it to make sure there’s not something silly happening in your own code before we take a look!
By the way, there is an unsolved threading issue when Direct Write is turned off, i posted some code to reproduce the problem some time ago Threading issue with Graphics::drawText (its not urgent, but just for the record. With Direct Write it works)
Thanks, but there are still too many unknowns here for us to help - if you have a chunk of self-contained code we could copy-paste into a project and run, then someone here could try it, but otherwise it could be a wild goose chase for us trying to reproduce the same thing…
I need to do more tests (but I just wanted to chime-in as I guess this is helpful than nothing right now).
One note, the component that paints this isn’t the main window and it’s being scaled down on non-retina.
ok… in the meanwhile I found why the editor is so slow while drawing… it’s the embedded font. if I comment both the lines where I create the system Typeface, the editor is built instantly… no lag.
Fixed. I removed the global Font variables I were using and created a static method where I return a static Typeface::Ptr with createSystemTypefaceFor.
sorry for reviving an old/solved thread.
I have the same issue for some fonts, where DirectWrite comes up with a different height than win32 typemetrics, resulting in a different getHeightToPointsFactor().
To me it seems like DirectWrite comes up with a consistent (therefore right?) look compared to macOS
My only solution is to check which fonts behave like this and not use them. changing code only for some fonts feels weird to me. is there any better solution?