Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: content/common/font_list_mac.mm

Issue 2472283002: In chrome://settings/fonts, fonts are not alphabetically ordered. (Closed)
Patch Set: fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/font_list_mac.mm
diff --git a/content/common/font_list_mac.mm b/content/common/font_list_mac.mm
index 8c7d889b853a9674ecd536dabeb2ac0a672260db..6eea74b2ee09870aa2fbad1eca8c79b50977cb92 100644
--- a/content/common/font_list_mac.mm
+++ b/content/common/font_list_mac.mm
@@ -17,7 +17,8 @@
std::unique_ptr<base::ListValue> font_list(new base::ListValue);
NSFontManager* fontManager = [[[NSFontManager alloc] init] autorelease];
NSArray* fonts = [fontManager availableFontFamilies];
- for (NSString* family_name in fonts) {
+ NSArray* sortedFonts = [fonts sortedArrayUsingSelector:@selector(compare:)];
+ for (NSString* family_name in sortedFonts) {
NSString* localized_family_name =
[fontManager localizedNameForFamily:family_name face:nil];
Avi (use Gerrit) 2016/11/04 05:31:53 You're sorting based on the family name above, yet
base::ListValue* font_item = new base::ListValue();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698