title: How to make Windows Ribbon Framework honor user's font size?
body: <p>The Office 2007/2010 team's ribbon honor's the user's (Menu) font size.</p>
  
  <p>The <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd371191%28v=vs.85%29.aspx" rel="nofollow noreferrer">Windows Ribbon Framework</a> ribbon (used by MS Paint, and my application) ignores the users's (i.e. my) font preferences.</p>
  
  <p>Screenshot showing:</p>
  
  <ul>
  <li>Excel 2010</li>
  <li>MS Paint (WRF)</li>
  <li>My application (WRF)</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/8qlv1.png" alt="enter image description here"></p>
  
  <p>How can i get the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd371191%28v=vs.85%29.aspx" rel="nofollow noreferrer">Windows Ribbon Framework</a> ribbon to honor the user's font size?</p>
  
  <h2>Bonus Chatter</h2>
  
  <p>There is no single "Windows Font". The user is allowed to configure six different fonts:</p>
  
  <ul>
  <li>Icon Title font</li>
  <li>Status font</li>
  <li>Message font</li>
  <li>Menu font</li>
  <li>Caption font</li>
  <li>Small Caption font</li>
  </ul>
  
  <p>The Office team's ribbon uses the <strong>Menu</strong> font, which makes sense since the ribbon is a menu. You can retreive the <strong>Menu font</strong> using:</p>
  
  <pre><code>//Win32
  SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, ref nonClientMetrics, 0); 
  nonClientMetrics.lfMenuFont;
  
  //.NET
  SystemFonts.MenuFont;
  
  //Delphi
  TScreen.MenuFont
  </code></pre>
  
  <p><strong>Ribbon color</strong>:</p>
  
  <p>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 <em>is</em> an api to change the <em>color</em> of the ribbon, as you can see in the 3rd ribbon (the one hosted in my application). </p>
  
  <pre><code>//change ribbon background color
  IPropertyStore(framework).SetValue(UI_PKEY_GlobalBackgroundColor, glassColor);
  
  //change ribbon font color
  IPropertyStore(framework).SetValue(UI_PKEY_GlobalTextColor, Color.Black);    
  </code></pre>
  
  <h2>Bonus Reading</h2>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/2659505/windows-ribbon-framework-how-to-change-font-face-and-size">Windows Ribbon Framework: How to change font face and size?</a> (<em>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</em>)</li>
  </ul>