Skip to content

Commit d4f471a

Browse files
committed
fix(Avalonia): do not use SkiaSharp NoDependencies variant
Fixes #212 Hey, we're pulling back on using `SkiaSharp.NativeAssets.Linux.NoDependencies`. Turns out, it just wasn't playing nice with the **Inter font** that we've got baked into the app. And honestly, if it can't handle a common font like Inter, it's pretty much useless to us for what we need. By switching back to the regular SkiaSharp setup, we're not only fixing the Inter font issue now, but we're also setting things up so that, down the road, you'll be able to change the font SnapX uses yourself.
1 parent 956ab10 commit d4f471a

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

SnapX.Avalonia/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ static AppBuilder BuildAvaloniaApp()
1515

1616
if (OperatingSystem.IsLinux() || OperatingSystem.IsFreeBSD())
1717
{
18-
builder.WithSystemFontSource(new Uri("avares://Avalonia.Fonts.Inter/Assets"));
1918
builder = builder.With(new FontManagerOptions
2019
{
2120
DefaultFamilyName = "Inter",

SnapX.Avalonia/SnapX.Avalonia.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
<AvaloniaVersion>11.3.2</AvaloniaVersion>
2323
<SkiaSharpVersion>3.119.0</SkiaSharpVersion>
2424
<HarfBuzzSharpVersion>8.3.1.1</HarfBuzzSharpVersion>
25-
<!-- After investigation, this needs to be an absolute path. It should be set by our build script later down the road. -->
26-
<!-- That way, you hopefully wouldn't need to have the snapx-ui executable right alongside it's .so/.dll/.dylib -->
27-
<AvaloniaNativeLibraryPath>/usr/local/lib/snapx</AvaloniaNativeLibraryPath>
2825

2926
<!-- Packagers: Do not modify the AssemblyName, it will break the compilation of XAML that depends on it being called snapx-ui. Instead create a executable shell script that calls snapx-ui -->
3027
</PropertyGroup>
@@ -59,9 +56,7 @@
5956
<PackageReference Include="HarfBuzzSharp.NativeAssets.Win32" Version="$(HarfBuzzSharpVersion)" />
6057
<PackageReference Include="Markdown.Avalonia" Version="11.0.2" />
6158
<PackageReference Include="SkiaSharp" Version="$(SkiaSharpVersion)" />
62-
<!-- We prefer the NoDependencies flavor -->
63-
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="$(SkiaSharpVersion)" ExcludeAssets="all" />
64-
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="$(SkiaSharpVersion)" />
59+
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="$(SkiaSharpVersion)" />
6560
<PackageReference Include="SkiaSharp.NativeAssets.macOS" Version="$(SkiaSharpVersion)" />
6661
<PackageReference Include="SkiaSharp.NativeAssets.Win32" Version="$(SkiaSharpVersion)" />
6762
<ProjectReference Include="..\SnapX.CommonUI\SnapX.CommonUI.csproj" />

0 commit comments

Comments
 (0)