Open rafael-rosa-knowcode opened 10 months ago
During testing we found other cases with different than expected behavior. The value pass as the real information is different of the XAML
<TextBlock FontWeight=" Black " Text="This text is Black plus whitespace" />
<TextBlock FontWeight="600" Text="This text is 600 weight" />
Current behavior
Using Material
When FontWeight is applied using numbers in a TextBlock element, the element would need to change the font size/style formatting.
We should accepts the formatting using numbers and the the corresponding name, as shown in FontWeights Class.
On the Windows platform, formatting was only applied above 700 (Bold). On the Wasm and Android platform, the behavior is that the numbers don't work. And using the Font Weight name just like windows. On the GTK platform, FontWeight does not work with numbers or the corresponding name. On the WPF the font do not work.
Using Fluent
On the Windows platform, formatting was only applied above 400 (Normal). On the Android and GTK platform, FontWeight does not work with numbers. On the Wasm platform FontWeight does not work with numbers and just the ExtraBlack name works.
Expected behavior
The expectation is that other platforms will behave like the Windows platform using fluent layout. In other words, styles must be applied using names and numbers.
How to reproduce it (as minimally and precisely as possible)
For Material
Create an Uno app Select Recommended (theme material) Not change parameters. Click Create Open the file MainPage.xaml on the main project. Change the StackPanel to
Run the App in each platform.
For Fluent
Create an Uno app Select Recommended and Click in Customize Change the Theme to Fluent Click Create Open the file MainPage.xaml on the main project. Change the StackPanel to
Run the App in each platform.
Workaround
I have not identified a workaround
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
Uno Extensions 5.0.9.11
NuGet package:
Microsoft.Extensions.Logging.Console => Version: 7.0.0 coverlet.collector => Version: 6.0.0 FluentAssertions => Version: 6.12.0 Microsoft.NET.Test.Sdk => Version: 17.7.2 NUnit => Version: 3.13.3 NUnit3TestAdapter => Version: 4.5.0 Newtonsoft.Json => Version: 13.0.3 Microsoft.Windows.Compatibility => Version: 7.0.5 Microsoft.Windows.SDK.BuildTools => Version: 10.0.22621.756 Microsoft.WindowsAppSDK => Version: 1.4.231008000 SkiaSharp.Skottie => Version: 2.88.6 SkiaSharp.Views.Uno.WinUI => Version: 2.88.6 Swashbuckle.AspNetCore => Version: 6.5.0 Uno.Core.Extensions.Logging.Singleton => Version: 4.0.1 Uno.Extensions.Core.WinUI => Version: 3.0.11 Uno.Extensions.Configuration => Version: 3.0.11 Uno.Extensions.Hosting => Version: 3.0.11 Uno.Extensions.Hosting.WinUI => Version: 3.0.11 Uno.Extensions.Http => Version: 3.0.11 Uno.Extensions.Http.WinUI => Version: 3.0.11 Uno.Extensions.Http.Refit => Version: 3.0.11 Uno.Extensions.Localization => Version: 3.0.11 Uno.Extensions.Localization.WinUI => Version: 3.0.11 Uno.Extensions.Logging.OSLog => Version: 1.7.0 Uno.Extensions.Logging.WebAssembly.Console => Version: 1.7.0 Uno.Extensions.Logging.WinUI => Version: 3.0.11 Uno.Extensions.Navigation => Version: 3.0.11 Uno.Extensions.Navigation.WinUI => Version: 3.0.11 Uno.Extensions.Navigation.Toolkit.WinUI => Version: 3.0.11 Uno.Extensions.Reactive => Version: 3.0.11 Uno.Extensions.Reactive.WinUI => Version: 3.0.11 Uno.Extensions.Serialization => Version: 3.0.11 Uno.Extensions.Serialization.Http => Version: 3.0.11 Uno.Extensions.Serialization.Refit => Version: 3.0.11 Uno.Material.WinUI => Version: 4.0.6 Uno.Dsp.Tasks => Version: 1.2.7 Uno.Toolkit.WinUI => Version: 5.0.17 Uno.Toolkit.WinUI.Material => Version: 5.0.17 Uno.Resizetizer => Version: 1.2.0 Uno.UI.Adapter.Microsoft.Extensions.Logging => Version: 5.0.41 Uno.UniversalImageLoader => Version: 1.9.36 Uno.Wasm.Bootstrap => Version: 8.0.3 Uno.Wasm.Bootstrap.DevServer => Version: 8.0.3 Uno.Wasm.Bootstrap.Server => Version: 8.0.3 Uno.WinUI => Version: 5.0.41 Uno.WinUI.Lottie => Version: 5.0.41 Uno.WinUI.DevServer => Version: 5.0.41 Uno.WinUI.Skia.Gtk => Version: 5.0.41 Uno.WinUI.WebAssembly => Version: 5.0.41 Xamarin.Google.Android.Material => Version: 1.10.0.1 Uno.UITest.Helpers => Version: 1.1.0-dev.70 Xamarin.UITest => Version: 4.3.0
Affected platforms
WebAssembly, Android, Skia (GTK on Linux/macOS/Windows), Windows
IDE
Visual Studio 2022
IDE version
Version 17.7.4
Relevant plugins
No response
Anything else we need to know?
May be related to issue #8477