I set up a resource dictionary to style all the controls in my WPF application, and I found some odd behavior when setting the font weight for the label.
I have styles configured for labels, the first with the usual font weight:
<Style x:Key="Label" TargetType="{x:Type Label}"> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="Margin" Value="10,0"/> </Style>
and the second set is bold:
<Style x:Key="LabelBold" TargetType="{x:Type Label}"> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="Margin" Value="10,0"/> <Setter Property="FontWeight" Value="Bold"/> </Style>
The problem is that when I use bold, the text is compressed (or text spacing):

I searched, but apparently I see no reason for this, if I expect something that the text will expand due to the increase in the thickness of the letter. Does this mean that this will happen, and if so, that is around?
EDIT: The following fonts are used in the window:
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/> <Setter Property="FontFamily" Value="Calibri"/> <Setter Property="FontSize" Value="12"/>
source share