csm10495 / PyDeskband

A Python-controlled Deskband for Windows
MIT License
12 stars 4 forks source link

Add anti-aliasing to font #2

Open 20Alexanderxx opened 2 months ago

20Alexanderxx commented 2 months ago

Hello, its me again. I thought that the deskband works fabulous and i like the opportunity of being able to write something in the taskband. But are you able to somewhat replicate the windows font? I attached pictures below. My first guess would be to "just" implement anti-aliasing? image vs image This would lead to a softer font and thus modernize the looks. Greetings!

csm10495 commented 2 months ago

Hi. I don't think there is a way (at least that I know of) how to force it to anti-alias differently. Funny enough we're calling DrawThemeTextEx(...) (https://learn.microsoft.com/en-us/windows/win32/api/uxtheme/nf-uxtheme-drawthemetextex) with a DTTOPTS(https://learn.microsoft.com/en-us/windows/win32/api/uxtheme/ns-uxtheme-dttopts) using the DTT_COMPOSITED flag, which per my current understanding should antialias already.

Do you have cleartype text enabled? https://www.laptopmag.com/articles/adjust-cleartype-windows-10

If yes, then maybe we could try changing the theme https://github.com/csm10495/PyDeskband/blob/master/dll/PyDeskband/PyDeskband/ControlPipe.cpp#L81 to something like WINDOW and see if it renders differently.