-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
Description
Describe the bug
Hello, I've got two prolem with TextBlock/SelectableTextBlock.
1.When I set Inlines, if the fontfamily is English type, it's ok, but if it is Chinese, the run with FontWeight set to Bold is not rendered correctly.
2.Watch the two images below, each third TextBlock is same, but they are rendered differently, only because the second TextBlock has a little difference.
To Reproduce
<Grid ColumnDefinitions="*,*,*">
<TextBlock
Grid.Column="0"
Background="Transparent"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontStyle="Oblique"
Margin="0 90 0 0"
FontFamily="Arial">
<Run >AAA</Run>
<Run FontWeight="Bold">BBB</Run>
<Run FontWeight="Bold">这是</Run>
<Run >一段</Run>
</TextBlock>
<TextBlock
Grid.Column="1"
Background="Transparent"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontStyle="Oblique"
Margin="0 90 0 0"
FontFamily="宋体">
<Run >AAA</Run>
<Run FontWeight="Bold" FontStyle="Normal">BBB</Run>
<Run FontWeight="Bold">这是</Run>
<Run >一段</Run>
</TextBlock>
<TextBlock
Grid.Column="2"
Background="Transparent"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontStyle="Oblique"
Margin="0 90 0 0"
FontFamily="宋体">
<Run >AAA</Run>
<Run FontWeight="Bold">BBB</Run>
<Run FontWeight="Bold">这是</Run>
<Run >一段</Run>
</TextBlock>
</Grid>
Expected behavior
No response
Avalonia version
11.3.12
OS
Windows
Additional context
No response
Reactions are currently unavailable