Browse Source
Merge pull request #2032 from AvaloniaUI/fix-default-font
Change the default font to system's default.
pull/2043/head
danwalmsley
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
6 additions and
6 deletions
-
src/Avalonia.Themes.Default/EmbeddableControlRoot.xaml
-
src/Avalonia.Themes.Default/Window.xaml
-
src/Avalonia.Visuals/Media/FontFamily.cs
-
tests/Avalonia.RenderTests/Controls/TextBlockTests.cs
-
tests/Avalonia.RenderTests/Media/VisualBrushTests.cs
|
|
|
@ -1,6 +1,5 @@ |
|
|
|
<Style xmlns="https://github.com/avaloniaui" Selector="EmbeddableControlRoot"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}"/> |
|
|
|
<Setter Property="FontFamily" Value="Segoe UI"/> |
|
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSizeNormal}"/> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
|
|
|
|
@ -1,6 +1,5 @@ |
|
|
|
<Style xmlns="https://github.com/avaloniaui" Selector="Window"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}"/> |
|
|
|
<Setter Property="FontFamily" Value="Segoe UI"/> |
|
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSizeNormal}"/> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
|
|
|
|
@ -48,7 +48,7 @@ namespace Avalonia.Media |
|
|
|
/// <summary>
|
|
|
|
/// Represents the default font family
|
|
|
|
/// </summary>
|
|
|
|
public static FontFamily Default => new FontFamily("Courier New"); |
|
|
|
public static FontFamily Default => new FontFamily(String.Empty); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the primary family name of the font family.
|
|
|
|
|
|
|
|
@ -30,6 +30,7 @@ namespace Avalonia.Direct2D1.RenderTests.Controls |
|
|
|
Height = 200, |
|
|
|
Child = new TextBlock |
|
|
|
{ |
|
|
|
FontFamily = new FontFamily("Courier New"), |
|
|
|
Background = Brushes.Red, |
|
|
|
FontSize = 12, |
|
|
|
Foreground = Brushes.Black, |
|
|
|
|
|
|
|
@ -29,7 +29,7 @@ namespace Avalonia.Direct2D1.RenderTests.Media |
|
|
|
|
|
|
|
private Control Visual |
|
|
|
{ |
|
|
|
get |
|
|
|
get |
|
|
|
{ |
|
|
|
return new Panel |
|
|
|
{ |
|
|
|
@ -83,7 +83,7 @@ namespace Avalonia.Direct2D1.RenderTests.Media |
|
|
|
await RenderToFile(target); |
|
|
|
CompareImages(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if AVALONIA_SKIA_SKIP_FAIL
|
|
|
|
[Fact(Skip = "FIXME")] |
|
|
|
#else
|
|
|
|
@ -270,7 +270,7 @@ namespace Avalonia.Direct2D1.RenderTests.Media |
|
|
|
await RenderToFile(target); |
|
|
|
CompareImages(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
public async Task VisualBrush_NoStretch_NoTile_BottomRightQuarterSource_BottomRightQuarterDest() |
|
|
|
{ |
|
|
|
@ -429,6 +429,7 @@ namespace Avalonia.Direct2D1.RenderTests.Media |
|
|
|
HorizontalAlignment = HorizontalAlignment.Left, |
|
|
|
Child = new TextBlock |
|
|
|
{ |
|
|
|
FontFamily = new FontFamily("Courier New"), |
|
|
|
Text = "Visual" |
|
|
|
} |
|
|
|
}), |
|
|
|
|