FluentIcons
FluentIcons copied to clipboard
Avalonia Foreground Color Broken on macOS
I discovered that with the latest version of FluentIcons.Avalonia on macOS (Sonoma 14.4.1)
the Foreground color is not applied. However, this works on Win 11
as well as on Linux Ubuntu 22.04
.
The behavior was introduced in FluentIcons.Avalonia v1.1.230
, but it was still working in version FluentIcons.Avalonia v1.1.228
.
I could not figure out the root cause, but I noticed that the fonts have been updated between these versions. Maybe this is related.
Behavior/Issue:
SymbolIcon Foreground color is not applied on macOS
.
Steps to reproduce:
Project File:
<Project Sdk="Microsoft.NET.Sdk">
...
<ItemGroup>
<!-- Broken starting with 1.1.230 -->
<PackageReference Include="FluentIcons.Avalonia" Version="1.1.233" />
<!-- Working -->
<!-- <PackageReference Include="FluentIcons.Avalonia" Version="1.1.228" /> -->
</ItemGroup>
....
</Project>
MainWindow.axaml
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ic="clr-namespace:FluentIcons.Avalonia;assembly=FluentIcons.Avalonia"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SymbolForegroundIssue.MainWindow"
Title="SymbolForegroundIssue">
<ic:SymbolIcon Symbol="Home" IsFilled="True" Foreground="Red" />
</Window>
Expected Outcome:
SymbolIcon Foreground color should be Red on macOS
.