AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
26.09k stars 2.26k forks source link

Font is not displayed on win-arm64 from 11.0.0-preview5 and onward #13206

Open davte-beijer opened 1 year ago

davte-beijer commented 1 year ago

Describe the bug

When building Avalonia projects targeting win-arm64 from 11.0.0-preview5 and onward no font will be displayed in the application.

To Reproduce

  1. Follow the getting started guide to build Avalonia
  2. From repository root run dotnet publish samples\ControlCatalog.NetCore\ControlCatalog.NetCore.csproj -c Release --self-contained true -r win-arm64
  3. Run the application on an win-arm64 device

Expected behavior

Font should be visible

Screenshots

11.0.0-preview5 and onward: image

11.0.0-preview4: image

Environment

timunie commented 1 year ago

Is the font available on the system?

davte-beijer commented 1 year ago

Yes, I have installed the Inter Font separately on the target, but makes no difference. When I run projects on my win-x64 machine it works fine and I do not have the Inter font installed.

timunie commented 1 year ago

Thx for confirming

maxkatz6 commented 1 year ago

Can you try to downgrade Angle version used in the project? By referencing this version of the angle package: https://www.nuget.org/packages/Avalonia.Angle.Windows.Natives/2.1.0.2023020321:

<PackageReference Include="Avalonia.Angle.Windows.Natives" Version="2.1.0.2023020321" />

Also, it seems not all windows on arm devices have old known compatibility issue - https://github.com/AvaloniaUI/Avalonia/issues/10405. Unless you are using software rendering from the beginning.

maxkatz6 commented 1 year ago

Upd: just remembered that 11.0.5-rc should use the older Angle package anyway. No idea what could go wrong then.

davte-beijer commented 1 year ago

Please update me if you need any other scenario verified!

timunie commented 1 year ago

Out of curiosity: Do you see any logs that could give us a hint?

timunie commented 1 year ago

I also wonder if we have a chance to find the commit that broke it for you.

davte-beijer commented 1 year ago

I made a smaller project based on the mvvm template and configured logging like the following:

 public static AppBuilder BuildAvaloniaApp()
        => AppBuilder.Configure<App>()
            .UsePlatformDetect()
            .WithInterFont()
            .LogToTrace(LogEventLevel.Verbose)
            .UseReactiveUI();

The logs do not mention anything that seem to be font issues, at least from what I can tell.

win-arm64.log win-x64.log