question

GUI-Kenny avatar image
0 Votes"
GUI-Kenny asked XiaopoYang-MSFT commented

Can a value be set on a Variable Font's set of available AXIS(s), programmatically, using managed code (C#)?

Can a value be set on a Variable Font's set of available AXIS(s), programmatically, using managed code (C#)? Like in a TextBlock control used in XAML.

I know how to do this with Fonts in CSS and HTML5, but don't know if .NET5 (WinUI 3) is set up to handle AXIS(s) from Variable Fonts. I also know, there is an interface, DWriteCore, where I can get AXIS information, and even functions to draw to a Device Context using these values.

Just want to set up a Slider to adjust Axis(s) and display the results.

I'm trying to see, where this capability is in Managed Code (C#).

Thank you in advance, for any assistance.

dotnet-csharpdotnet-runtimewindows-app-sdk-winui3windows-app-sdk-general
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Now that you can use DWriteCore in managed code, Can you set FONT_AXIS with DWriteCore?

0 Votes 0 ·

I am talking about setting the Style of a Control like TextBlock, to use an Axis with a specified value. Just like you can make the text in one control, italic, and another control bold. I'm not looking to pick an all Italic or all Bold font. I want to choose the base font and set axis as I please for controls using that particular variable font.

0 Votes 0 ·

Perhaps you can refer to Control.FontStyle Property.

0 Votes 0 ·

0 Answers