E
E
EditorMaster2021-02-04 16:55:22
WPF
EditorMaster, 2021-02-04 16:55:22

How to customize text rendering in WPF?

Hello. I made a layout for a WPF application in Photoshop, and I ran into a problem when transferring text from the layout. Text looks different on the layout and in the app.
This is how it looks on the layout:
l4vz1qdxUms.jpg?size=203x54&quality=96&proxy=1&sign=b9ca01dbf67b04dbeebbc4150c393e8d&type=album
And this is how it looks in the application:
tCGlWliKxwE.jpg?size=235x52&quality=96&proxy=1&sign=9b16fb6d279c60b3ee6d2dd18342cd82&type=album
I searched for solutions on the Internet and came across TextModes, but they do not work. The text still looks flattened and stretched across the width. This has a significant effect on the overall picture of the application.

<TextBlock Text="Управление"
                           Foreground="#979eb1"
                           FontSize="17"
                           HorizontalAlignment="Center"
                           Margin="0 10 0 0"
                           TextOptions.TextFormattingMode="Ideal"
                           TextOptions.TextRenderingMode="ClearType"
                           TextOptions.TextHintingMode="Auto"
                           FontFamily="{StaticResource Montserrat-Regular}"
                           FontWeight="Regular"
                           />


Can anything be done about it? Or will you have to be content with what WPF gives you?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2021-02-04
@EditorMaster

https://stackoverflow.com/questions/2948290/why-fo...
maybe this will help? First answer right away.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question