How can I change FontWeight of paragraph when FontFamily of a FlowDocument is set?

439 views Asked by At

Imagine you have the following style for a FlowDocument.

<Style TargetType="{x:Type FlowDocument}">
    <Setter Property="FontFamily" Value="Segoe UI regular"/>
    <Setter Property="FontSize" Value="16"/>
    <Setter Property="LineHeight" Value="19"/>
</Style>

now this won't make it bold for some reason.

<Paragraph>
    <Bold>Is this bold?</Bold>
</Paragraph>

or even this

<Run FontWeight="Bold" Text="{DynamicResource CMMsg_7114}" />

Keep in mind that if I don't set the parent FontFamily and use the default font both methods work just fine. Any idea how can I solve this problem?

1

There are 1 answers

0
mm8 On BEST ANSWER

The FontFamily "Segoe UI regular" does not support bold characters. Change the FontFamily to "Segoe UI":

<Style TargetType="{x:Type FlowDocument}">
    <Setter Property="FontFamily" Value="Segoe UI"/>
    <Setter Property="FontSize" Value="16"/>
    <Setter Property="LineHeight" Value="19"/>
</Style>