The Office 2007/2010 team's ribbon honor's the user's (Menu) font size.
The Windows Ribbon Framework ribbon (used by MS Paint, and my application) ignores the users's (i.e. my) font preferences.
Screenshot showing:
- Excel 2010
- MS Paint (WRF)
- My application (WRF)
How can i get the Windows Ribbon Framework ribbon to honor the user's font size?
Bonus Chatter
There is no single "Windows Font". The user is allowed to configure six different fonts:
- Icon Title font
- Status font
- Message font
- Menu font
- Caption font
- Small Caption font
The Office team's ribbon uses the Menu font, which makes sense since the ribbon is a menu. You can retreive the Menu font using:
//Win32
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, ref nonClientMetrics, 0);
nonClientMetrics.lfMenuFont;
//.NET
SystemFonts.MenuFont;
//Delphi
TScreen.MenuFont
Ribbon color:
By default the ribbon doesn't honor the user's color scheme (notice in my screenshots the blue ribbon, with my brown glass color). There is an api to change the color of the ribbon, as you can see in the 3rd ribbon (the one hosted in my application).
//change ribbon background color
IPropertyStore(framework).SetValue(UI_PKEY_GlobalBackgroundColor, glassColor);
//change ribbon font color
IPropertyStore(framework).SetValue(UI_PKEY_GlobalTextColor, Color.Black);
Bonus Reading
- Windows Ribbon Framework: How to change font face and size? (That question was about how to set an arbitrary font face and size - which could be used to honor the user's Windows font preferences. This question is about instructing the ribbon itself to honor the user's font preference, while still being unable to specify an arbitrary font face/size)