wpf: LinearGradientBrush in Multi-language text element bug.
<Window.Resources>
<LinearGradientBrush x:Key="brush1" StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Offset="0" Color="Red" />
<GradientStop Offset="1" Color="blue" />
</LinearGradientBrush>
</Window.Resources>
<TextBlock Foreground="{StaticResource brush1}" Text="我是abcdefg文本わたしは" />
Display result in view ↓ (bad):
This is default font (MS YaHei) in zh-cn OS.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 16 (4 by maintainers)
@stevenbrix
@nsivov the desired result is below ↓(font-family : STSong. Have full character set in one font file.)
Could you bring the Text to geometry and draw the geometry with LinearGradientBrush?
How to bring the Text to geometry see https://stackoverflow.com/q/1036327/6116637