not-nullptr / Aerochat

Native rewrite of Aerochat, a WLM 09 themed Discord client
Mozilla Public License 2.0
147 stars 8 forks source link

Respect user font smoothing settings #7

Closed kawapure closed 1 month ago

kawapure commented 2 months ago

WPF by default doesn't respect the user's font smoothing settings, and instead uses smooth fonts in all cases. Oddly enough, it's pretty much natively capable of handling fonts like other native applications do. With a tiny wrapper, you can replicate just about how GDI DrawText will produce text according to the user's settings.

Windows Live Messenger was built with DirectUI, which used GDI or GDI+ for font rendering. This commit makes font rendering slightly more accurate to the actual WLM clients.

(+ I added a couple documentation comments in a secondary commit)

not-nullptr commented 1 month ago

wow i actually really appreciate this. you could see my effort in app.xaml to make fonts more accurate but im pretty sure this is pretty much pixel perfect now.

(also thanks 4 the comments on the wndproc hook ^^)