So, on my development machine I had installed Clear Type fonts. Then when we got a production machine, it wasn't matching images because the fonts were different. Eventually I remembered why!
Is there any way to find out what fonts Windows (7) is using on a given machine? When I distribute my compiled macro it might be useful to send the fonts with it. From what I've found I can find all the loaded fonts, but how do I know which ones are actually being used by the operating system?
Fonts gotcha
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Fonts gotcha
I did some research for you. This code will tell you whether ClearType is enabled or not:
However, I think there may be many other factors at play. E.g. I think you can have some kind of font anti-aliasing enabled even when ClearType is NOT enabled. This can also be detected using similar to above. See:
SystemParametersInfo function
I haven't had much luck trying to work out how to get the fonts that are in use by the theme. A theme could be customised so there could be more than one font and size in use.
Code: Select all
Let>SPI_GETFONTSMOOTHINGTYPE=8202
LibFunc>user32.dll,SystemParametersInfoA,res,SPI_GETFONTSMOOTHINGTYPE,0,REF:0,0
If>res_3=2
MessageModal>ClearType Enabled
Else
MessageModal>ClearType Not Enabled
Endif
SystemParametersInfo function
I haven't had much luck trying to work out how to get the fonts that are in use by the theme. A theme could be customised so there could be more than one font and size in use.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Fonts gotcha
Oh yeah, I didn't even think about themes. Yikes! Maybe I should create my own theme and simply move it to new computers.