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
parent
commit
326f74f398
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/Avalonia.Themes.Default/EmbeddableControlRoot.xaml
  2. 1
      src/Avalonia.Themes.Default/Window.xaml
  3. 2
      src/Avalonia.Visuals/Media/FontFamily.cs
  4. 1
      tests/Avalonia.RenderTests/Controls/TextBlockTests.cs
  5. 7
      tests/Avalonia.RenderTests/Media/VisualBrushTests.cs

1
src/Avalonia.Themes.Default/EmbeddableControlRoot.xaml

@ -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
src/Avalonia.Themes.Default/Window.xaml

@ -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>

2
src/Avalonia.Visuals/Media/FontFamily.cs

@ -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.

1
tests/Avalonia.RenderTests/Controls/TextBlockTests.cs

@ -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,

7
tests/Avalonia.RenderTests/Media/VisualBrushTests.cs

@ -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"
}
}),

Loading…
Cancel
Save