-
Notifications
You must be signed in to change notification settings - Fork 363
Open
Labels
bug 🐛An unexpected issue that highlights incorrect behaviorAn unexpected issue that highlights incorrect behavior
Description
Describe the bug
When you download font from https://fonts.google.com/specimen/Open+Sans
you have the choice to use a "variable" font file.
"variable" font files contains alternative axes. Foe ex:
wdth
wght
This is more practical than to use many static font files to get BOLD, MEDIUM etc ...
Both android 12+ and iOS 11+ support variable font files.
Example of a valid file name:
OpenSans-Italic-VariableFont_wdth,wght.ttf
When you add that file to the Fonts folder, resizer crashes.
1>Microsoft.Maui.Resizetizer.After.targets(568,17): Error MSB4186 : Invalid static method invocation syntax: "[System.IO.Path]::GetFileName(obj\Debug\net10.0-android\android-x64\resizetizer\f\OpenSans-VariableFont_wdth,wght.ttf)". Method 'System.IO.Path.GetFileName' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order.
When you rename the file, resizer continues to crash. Until your clean and rebuild.
Regression
No response
Steps to reproduce
You can download the font "OpenSans" on google font.
Both android 12+ and iOS 11+ support variable font files.
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiCommunityToolkit()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-VariableFont_wdth,wght.ttf", "OpenSans");
});
``
### Expected behavior
don't crash :)
### Screenshots
_No response_
### IDE and version
Rider
### IDE version
2025.3.0.1
### Nuget packages
- [ ] CommunityToolkit.Common
- [ ] CommunityToolkit.Diagnostics
- [ ] CommunityToolkit.HighPerformance
- [ ] CommunityToolkit.Mvvm (aka MVVM Toolkit)
### Nuget package version(s)
10.0.10
### Additional context
- OS: Window 11
- Target: maui android 10
- VS 2026
### Help us help you
No, just wanted to report this
Metadata
Metadata
Assignees
Labels
bug 🐛An unexpected issue that highlights incorrect behaviorAn unexpected issue that highlights incorrect behavior