AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
26.06k stars 2.25k forks source link

There is an abnormal display in Nepali language #17469

Open RyanLiDev opened 2 weeks ago

RyanLiDev commented 2 weeks ago

Describe the bug

When the text is opaque, there is a white border. image

To Reproduce

FontFamily: Noto Sans OriginalText: Hello, Welcome Translation: नमस्ते, स्वागत छ

    <StackPanel Spacing="8" Background="LightBlue">
      <TextBlock FontFamily="/Assets/Fonts/NotoSans-Bold.ttf#Noto"
                 FontSize="95"
                 FontWeight="Bold"
                 Foreground="White"
                 Opacity="0.6"
                 Text="नमस्ते, स्वागत छ" />
      <TextBlock FontFamily="/Assets/Fonts/NotoSans-Bold.ttf#Noto"
                 FontSize="95"
                 FontWeight="Bold"
                 Foreground="White"
                 Opacity="1"
                 Text="नमस्ते, स्वागत छ" />
      <TextBlock FontFamily="/Assets/Fonts/NotoSans-Bold.ttf#Noto"
                 FontSize="95"
                 FontWeight="Bold"
                 Foreground="Red"
                 Opacity="0.6"
                 Text="नमस्ते, स्वागत छ" />
      <TextBlock FontFamily="/Assets/Fonts/NotoSans-Bold.ttf#Noto"
                 FontSize="95"
                 Foreground="White"
                 FontWeight="Bold"
                 Opacity="0.6"
                 Text="Hello, welcome" />
    </StackPanel>

Expected behavior

It should display normally. sample from figma.com image

Avalonia version

11.2.0

OS

Windows, Linux

Additional context

The test found that it seemed to be caused by stroke, but TextBlock did not provide the relevant interface. Display exception: image

Normal display: image