Sort fonts alphabetically (#9653)
Validated this only by following the issue description and verified fonts appeared to be sorted alphabetically now. Closes #9594
This commit is contained in:
parent
3323dc5724
commit
cf5dc285a9
|
@ -153,10 +153,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
|||
}
|
||||
|
||||
// sort and save the lists
|
||||
std::sort(begin(fontList), end(fontList));
|
||||
std::sort(begin(fontList), end(fontList), FontComparator());
|
||||
_FontList = single_threaded_observable_vector<Editor::Font>(std::move(fontList));
|
||||
|
||||
std::sort(begin(monospaceFontList), end(monospaceFontList));
|
||||
std::sort(begin(monospaceFontList), end(monospaceFontList), FontComparator());
|
||||
_MonospaceFontList = single_threaded_observable_vector<Editor::Font>(std::move(monospaceFontList));
|
||||
}
|
||||
CATCH_LOG();
|
||||
|
|
|
@ -13,6 +13,14 @@
|
|||
|
||||
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
struct FontComparator
|
||||
{
|
||||
bool operator()(const Font& lhs, const Font& rhs) const
|
||||
{
|
||||
return lhs.LocalizedName() < rhs.LocalizedName();
|
||||
}
|
||||
};
|
||||
|
||||
struct Font : FontT<Font>
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue