You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Avalonia TextBlock with Inlines (Bold, Italic, or Span with FontWeight/FontStyle), the special text formatting (bold/italic) doesn't work for Chinese characters. The Chinese text is displayed as normal text without any style changes.
To Reproduce
Create a TextBlock control
Add Inlines with Bold or Italic formatting for Chinese text
<UserControlx:Class="AvaloniaTextBlockInlines.Views.MainView"xmlns="https://github.com/avaloniaui"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:vm="clr-namespace:AvaloniaTextBlockInlines.ViewModels"d:DesignHeight="450"d:DesignWidth="800"x:DataType="vm:MainViewModel"mc:Ignorable="d">
<StackPanelName="container"Orientation="Vertical">
<TextBlockHorizontalAlignment="Center"VerticalAlignment="Center">
这是一个<Bold>文本</Bold>
,由<Italic>叉啊姆鲁</Italic>
创建</TextBlock>
<TextBlockHorizontalAlignment="Center"VerticalAlignment="Center">
This <Bold>English</Bold>
text is created by<Italic>XAML</Italic>
</TextBlock>
<TextBlockName="codeBehindTextBlock"HorizontalAlignment="Center"VerticalAlignment="Center" />
</StackPanel>
</UserControl>
Expected behavior
Chinese characters should be displayed with bold or italic formatting, just like Latin characters do.
Avalonia version
11.2.0
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered:
Yes. The fallback algorithm does not make sure the weight and style are matching. The system font manager yields the first font that holds the requested character. It might be possible this issue can't be solved. This is an issue with the system font manager.
When setting FontWeight and FontStyle on a TextBlock, Chinese text can be properly bolded and italicized. Why does this happen? Does TextBlock use software simulation to render these two special styles?
When setting FontWeight and FontStyle on a TextBlock, Chinese text can be properly bolded and italicized. Why does this happen? Does TextBlock use software simulation to render these two special styles?
Describe the bug
When using Avalonia TextBlock with Inlines (Bold, Italic, or Span with FontWeight/FontStyle), the special text formatting (bold/italic) doesn't work for Chinese characters. The Chinese text is displayed as normal text without any style changes.
To Reproduce
Expected behavior
Chinese characters should be displayed with bold or italic formatting, just like Latin characters do.
Avalonia version
11.2.0
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: