Open BrundhaVelusamy opened 2 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
I can repro this issue at Windows platform on the latest 17.12.0 Preview 1.0(8.0.82 &8.0.80 & 8.0.3).
This may be a packaged/unpackaged difference. Because Windows apps cannot be launched via the CLI/VSCode :( we use an unpackaged app. VS uses packaged by default.
Now, does this help you? Not really, but it will explain why the different IDEs behave differently.
What is the value that eventually gets to the font family? format.FontFamily = fontFamily?.Source;
This may be a packaged/unpackaged difference. Because Windows apps cannot be launched via the CLI/VSCode :( we use an unpackaged app. VS uses packaged by default.
Now, does this help you? Not really, but it will explain why the different IDEs behave differently.
What is the value that eventually gets to the font family?
format.FontFamily = fontFamily?.Source;
@mattleibow, Thank you for your details.
format.FontFamily = fontFamily?.Source;
--> Here format.FontFamily will get the details of the assigned font family of the custom control, like ms-appx:///Cinzel-Regular.ttf#Cinzel
.
There is already an existing issue in WinUI when building the project on the Unpackaged version on Visual Studio: CanvasTextFormat throws in Unpackaged apps
Any update on this issue?
Please provide high priority for this issue.
Description
When running a .NET MAUI application in Visual Studio Code on Windows, a
System.ArgumentException
with the message "Value does not fall within the expected range" occurs if the font family is set for any Win2D-drawn custom controls. The exception does not occur when running the same project in Visual Studio.Replication sample: FontFamilyIssue.zip
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.82 SR8.2
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
No response