S
S
skvoshiz2016-04-17 08:06:53
Programming
skvoshiz, 2016-04-17 08:06:53

How to improve font rendering in WPF?

Hello, I ran into this problem, I googled - I could not find an answer.
I write in C# WPF .Net 4.0 I
use the Roboto font
This photo is on Windows 10 (1920*1080) monitor resolution.
b2e36231bab441908586c13c56ccdd23.PNG
Link to photo: https://habrastorage.org/files/b2e/362/31b/b2e3623...
This photo is Windows 7 (1366*768) monitor resolution.
89f14425c0b745d485c63d23a99c7480.PNG
Link to the photo: https://habrastorage.org/files/89f/144/25c/89f1442... It's
better to open the photo, so it will be more visible and understandable
How to make the fonts display correctly? As on Windows 10 (1920*1080)
Tried like this:

<Window TextOptions.TextFormattingMode="Display" ...... />

And then even on Windows 10 (1920 * 1080) it is displayed as on Windows 7 (1366 * 768)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-04-17
@mezastel

The thing is that you used a non-standard font. Standard fonts have such a thing as hinting - tips on how to rasterize a font at low resolution. Obviously, the font you took doesn't have this hinting, so at 96dpi everything looks like hell.
I advise you not to be smart and use Arial, Segoe and others like him. If you want third-party fonts, look for those developed by serious firms, such as Ubuntu fonts. And then, everything must be checked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question