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

Unified Diff: content/common/font_list_pango.cc

Issue 2278143002: Filter font list, use Fontconfig and build on Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copyright line fixed Created 4 years, 4 months 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 | « content/common/font_list_ozone.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/font_list_pango.cc
diff --git a/content/common/font_list_pango.cc b/content/common/font_list_pango.cc
deleted file mode 100644
index f7d82fc5a2232acb45cc1e7c3b9666abb1556708..0000000000000000000000000000000000000000
--- a/content/common/font_list_pango.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/common/font_list.h"
-
-#include <pango/pango.h>
-#include <pango/pangocairo.h>
-
-#include <set>
-#include <string>
-#include <utility>
-
-#include "base/values.h"
-
-namespace content {
-
-std::unique_ptr<base::ListValue> GetFontList_SlowBlocking() {
- std::unique_ptr<base::ListValue> font_list(new base::ListValue);
-
- PangoFontMap* font_map = ::pango_cairo_font_map_get_default();
- PangoFontFamily** families = NULL;
- int num_families = 0;
- ::pango_font_map_list_families(font_map, &families, &num_families);
-
- std::set<std::string> sorted_families;
- for (int i = 0; i < num_families; i++) {
- sorted_families.insert(::pango_font_family_get_name(families[i]));
- }
- g_free(families);
-
- for (std::set<std::string>::const_iterator iter = sorted_families.begin();
- iter != sorted_families.end(); ++iter) {
- std::unique_ptr<base::ListValue> font_item(new base::ListValue());
- font_item->AppendString(*iter);
- font_item->AppendString(*iter); // localized name.
- // TODO(yusukes): Support localized family names.
- font_list->Append(std::move(font_item));
- }
-
- return font_list;
-}
-
-} // namespace content
« no previous file with comments | « content/common/font_list_ozone.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698