Default Font Changed

Nov 26, 2012 at 9:35 AM

Updating from version 6e767470198e to 64f8176b730a the default font changed. The old font was much better readable than the new one.

So I would like to know, how can I get back to the old font?

And additionally I don't like that the default font of all controls in my application changed too. It would be much better, if fluent wouldn't affect any other controls in my application.

FYI: I don't set any fluent theme (but maybe fluent does this without my knowledge).

Developer
Nov 26, 2012 at 9:29 PM

We did not change the font. The default font was always Segeo UI. Can you verify that your application window has Segeo UI as font?

What we did change, is not setting TextOptions.TextFormattingModeProperty anymore.

The default value if WPF for that mode is TextFormattingMode.Ideal and till then we overwrote this with TextFormattingMode.Ideal, so in fact there should be no visible change.

If you want to set this mode to Ideal in your application you can do this by simply setting TextOptions.TextFormattingMode="Ideal" on your windows or overwrite the default metadata before any control is created in your application.

But as the mode should already be set to Ideal (because this is the default in WPF) there should be no visible changes. If you can see any changes, it would be very interesting to see some screenshots showing the differences.

As to your concern:

U use the RibbonWindow and as we have to set some properties for this window (FontFamily, FontSize, FontWeigth, Foreground etc.) those property-values get inherited by all other controls which are in the visual tree of the window.

 

 
Nov 27, 2012 at 11:45 AM

You are right, it's not another font. But there is definitly a change.

Looking at the fluent code I think I found the cause. In the old version FrameworkHelper.cs had a line with

TextOptions.SetTextFormattingMode(d, TextFormattingMode.Display);

This line was deleted in the new version.

So I set now

TextOptions.TextFormattingMode="Display"

on the window content and the font is now as it was in the old version.

 

BTW: What do you mean by "or overwrite the default metadata before any control is created in your application"? Can you tell me how this can be done?

Developer
Feb 22, 2013 at 11:04 PM
You can override the default values of DependencyProperties, even when you don't own them.
But this has to be done before those are used for the first time.
You just have to use OverrideMetadata on a dependency property and supply the same PropertyMetadata type which is used in the original definition of the dependency property.
Mar 28, 2013 at 10:54 AM
batzen wrote:
We did not change the font. The default font was always Segeo UI. Can you verify that your application window has Segeo UI as font?
You overwrite default font for all application and (what is problem for me), it's size from 12 to 11 for office 2010 themes.

It is file Fonts.xaml:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:System="clr-namespace:System;assembly=mscorlib">
  <FontFamily x:Key="DefaultFontFamily">Segoe UI</FontFamily>
  <System:Double x:Key="DefaultFontSize">11</System:Double>
</ResourceDictionary>
And another problem if I change font size to 12 here, application's font is OK, but ribbon buttons are not looks well, but I want use 12 as it is standard and looks perfect. Is it possible (with all ribbon controls looks well same time)?
Mar 28, 2013 at 10:55 AM
MichaelTR wrote:
You are right, it's not another font. But there is definitly a change. Looking at the fluent code I think I found the cause. In the old version FrameworkHelper.cs had a line with TextOptions.SetTextFormattingMode(d, TextFormattingMode.Display); This line was deleted in the new version. So I set now TextOptions.TextFormattingMode="Display" on the window content and the font is now as it was in the old version.   BTW: What do you mean by "or overwrite the default metadata before any control is created in your application"? Can you tell me how this can be done?
Where exactly you put such code? I want try to check it as well..
Apr 8, 2013 at 1:45 PM
Edited Apr 8, 2013 at 1:45 PM
Arteny wrote:
MichaelTR wrote:
You are right, it's not another font. But there is definitly a change. Looking at the fluent code I think I found the cause. In the old version FrameworkHelper.cs had a line with TextOptions.SetTextFormattingMode(d, TextFormattingMode.Display); This line was deleted in the new version. So I set now TextOptions.TextFormattingMode="Display" on the window content and the font is now as it was in the old version.   BTW: What do you mean by "or overwrite the default metadata before any control is created in your application"? Can you tell me how this can be done?
Where exactly you put such code? I want try to check it as well..
You have to set the TextOptions.TextFormattingMode on the RibbonWindow, for example:
  <fluent:RibbonWindow
    ...
    TextOptions.TextFormattingMode="Display">
Apr 8, 2013 at 6:44 PM
dredav, ok, thanks