-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs about ClearType text rendering (#50)
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
How to improve blurred formulas | ||
====================================================== | ||
|
||
Since `FormulaControl` is a WPF control it has `TextOptions` properties | ||
to tune how formulas are rendered. Default settings provides smooth and | ||
clear output for large font sizes, but for smaller ones it may looks | ||
blurred. It's a personal preference, and if you are unhappy with default | ||
settings you may override it by creating custom style: | ||
|
||
```xml | ||
<Window ... xmlns:controls="clr-namespace:WpfMath.Controls;assembly=WpfMath"> | ||
<Window.Resources> | ||
<Style x:Key="ClearTypeFormula" TargetType="controls:FormulaControl"> | ||
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType" /> | ||
<Setter Property="TextOptions.TextHintingMode" Value="Fixed" /> | ||
<Setter Property="TextOptions.TextFormattingMode" Value="Display" /> | ||
</Style> | ||
</Window.Resources> | ||
|
||
<controls:FormulaControl Formula="\left(x^2 + 2 \cdot x + 2\right) = 0" | ||
Style="{StaticResource ClearTypeFormula}" /> | ||
</Window> | ||
``` | ||
|
||
Let's see on output for different settings. | ||
|
||
- Default settings: | ||
|
||
![Formula's rendering with default settings](default.png) | ||
|
||
- ClearType style: | ||
|
||
![Formula's rendering with ClearType settings](cleartype.png) | ||
|
||
Second formula looks great with sharp symbols! But for larger font size it | ||
might be not pleasible, so you may want to experiment with WPF rendering | ||
options further. | ||
|
||
If you still have problems with blurred/noisy formulas, please tell us in | ||
this [umbrella issue](https://github.com/ForNeVeR/wpf-math/issues/50). We | ||
are trying hard to achieve best-looking rendering on WPF, but sometimes it | ||
might be tricky. | ||
|
||
Thanks! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.