When I use RenderTransform property and scale up a RichTextBox I get magnified text which is pixelized (square text edges).
How I can prevent this?
EDIT:
I have TextOptions.TextFormattingMode="Display" - when I remove this option everything is fine!
Cannot claim that i can reproduce this with my current settings:
That is with a scale of 20. I think this could be dependent on the ClearType system settings, you can try setting RenderOptions.ClearTypeHint="Enabled"
on the RichTextbox, that might enforce it.
Also try setting TextOptions.TextRenderingMode="ClearType"
.
Edit: This SO question deals with text-rendering quite in-depth and might be helpful.
Edit: Check out this weirdness:
<TextBlock Text="Lorem ipsum dolor sit"
FontSize="20" TextOptions.TextFormattingMode="Display">
<TextBlock.RenderTransform>
<ScaleTransform x:Name="trans" ScaleY="10" ScaleX="10"/>
</TextBlock.RenderTransform>
<TextBlock.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation To="20" Duration="0:0:5"
Storyboard.TargetName="trans" Storyboard.TargetProperty="ScaleX"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</TextBlock.Triggers>
</TextBlock>
As soon as a certain scale is reached the text becomes clear for me, really odd...
This worked for me:
TextOptions.TextFormattingMode="Ideal"
as suggested on: http://www.newventuresoftware.com/blog/wpf-text-rendering-quirks-scaletransform
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With