Custom font family is not working in WebAssembly
amirhoseinadlfar opened this issue · comments
Describe the bug
Is there any arabic/persian support for WebAssembly?
To Reproduce
code :
im using Avalonia.Markup.Declarative
protected override object Build()
{
return new StackPanel()
.Orientation(Orientation.Vertical)
.Children(
new TextBlock()
.Text("نام کاربری"),
new TextBox(),
new TextBlock()
.Text("رمزعبور"),
new TextBox(),
new TextBlock()
.Text("تکرار رمزعبور"),
new TextBox()
);
}
font style :
Styles.Add(new Style()
.Selector(selector => selector.Is<TemplatedControl>())
.Setter(TemplatedControl.FontFamilyProperty, new FontFamily("Nahid")));
font resource loading :
//avares://AvaloniaClient/Assets/Fonts/Nahid.ttf
FontFamily nahidFontFamily = new FontFamily(Assets.Fonts.NahidPath);
Resources.Add("Nahid", nahidFontFamily);
Expected behavior
No response
Avalonia version
11.0.10
OS
WebAssembly
Additional context
font family is https://github.com/rastikerdar/nahid-font
can you try 11.1 beta? Please mind the breaking changes for browser when you do so (mentioned in 11.1 beta1 thread)