views:

96

answers:

0

How do you change the font face and font size used by the Windows Ribbon Framwork's UIRibbon?

The font used by the ribbon does not match the font the user has chosen as their Windows preferences - which is the preference my application uses. This means that as the font in Windows gets bigger, the ribbon gets smaller:

alt text

Here an an older screenshot, showing my fake ribbon (before the introduction of the Windows Ribbon Framework), and the Ribbon Framework version:

Note: Top=non-Microsoft, Bottom=Windows Ribbon Framework

alt text


Note: You can change the colors of the ribbon:

alt text

With code like the following:

    IUIFramework framework;
    ...

    TColor glass = Dwm.GetColorizationColor();
    VarCast(v, ColorToUIHSB(glass), UI_PKEY_GlobalBackgroundColor.pid);

    IPropertyStore ps = framework as IPropertyStore;
    ps.SetValue(UI_PKEY_GlobalBackgroundColor, PROPVARIANT(v));
    ps.Commit;

But i can't find the option to change the font face/size.

Background

The user can configure Windows to use their preferred font size, e.g.:

  • 8pt
  • 9pt
  • 12pt

and their preferred font face, e.g.:

  • MS Sans Serif
  • Microsoft Sans Serif
  • Tahoma
  • Segoe UI
  • Calibri

but the Windows Ribbon Framework by default uses a font that is not the user's preference.

Edit: Moved picture up top to catch squirrels attracted by shiny things.
Edit 2: Added another colorful picture, to get a bump.
Edit 3: Editing to get a bump

Keywords: Windows Ribbon Framework, change font size, UIRibbon, font face, ribbon ui, scenic ui, scenic ribbon, fluent ribbon, fluent ui, change font windows ribbon, uiribbon.h