forked from felixse/FluentTerminal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* felixse#957 - using CanvasTextFormat instead of CanvasFontSet. this drops Monospace Fonts highlighting, while resolves a crash at least. * Revert "highlight monospaced fonts" This reverts commit 2d204e4. # Conflicts resolved: # FluentTerminal.App.ViewModels/Settings/TerminalPageViewModel.cs # FluentTerminal.App/App.xaml # FluentTerminal.App/Services/SystemFontService.cs # FluentTerminal.Models/FontInfo.cs * Fixes felixse#957 - Revert "highlight monospaced fonts" This reverts commit 2d204e4. # Conflicts resolved: # FluentTerminal.App.ViewModels/Settings/TerminalPageViewModel.cs # FluentTerminal.App/App.xaml # FluentTerminal.App/Services/SystemFontService.cs # FluentTerminal.Models/FontInfo.cs
- Loading branch information
1 parent
e258681
commit a76551a
Showing
9 changed files
with
11 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
using FluentTerminal.Models; | ||
using System.Collections.Generic; | ||
using System.Collections.Generic; | ||
|
||
namespace FluentTerminal.App.Services | ||
{ | ||
public interface ISystemFontService | ||
{ | ||
IEnumerable<FontInfo> GetSystemFontFamilies(); | ||
IEnumerable<string> GetSystemFontFamilies(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,14 @@ | ||
using FluentTerminal.Models; | ||
using Microsoft.Graphics.Canvas.Text; | ||
using Microsoft.Graphics.Canvas.Text; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace FluentTerminal.App.Services | ||
{ | ||
public class SystemFontService : ISystemFontService | ||
{ | ||
public IEnumerable<FontInfo> GetSystemFontFamilies() | ||
public IEnumerable<string> GetSystemFontFamilies() | ||
{ | ||
return CanvasFontSet.GetSystemFontSet().Fonts.Select(x => new FontInfo { Name = x.FamilyNames.Values.FirstOrDefault(), IsMonospaced = x.IsMonospaced }).Distinct(new FontInfoComparer()); | ||
return CanvasTextFormat.GetSystemFontFamilies(); | ||
} | ||
|
||
private class FontInfoComparer : IEqualityComparer<FontInfo> | ||
{ | ||
public bool Equals(FontInfo x, FontInfo y) | ||
{ | ||
return x.Name == y.Name; | ||
} | ||
|
||
public int GetHashCode(FontInfo obj) | ||
{ | ||
return obj.Name.GetHashCode(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.