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

Unified Diff: content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc

Issue 12600019: Add Pepper TrueType font API plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_aura. Pango headers missing. Created 7 years, 9 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
Index: content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc b/content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc
new file mode 100644
index 0000000000000000000000000000000000000000..661266d9a8b508606ae90f9c340522cb232719be
--- /dev/null
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc
@@ -0,0 +1,25 @@
+// Copyright (c) 2013 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/browser/renderer_host/pepper/pepper_truetype_font_list.h"
+
+#include <pango/pango.h>
+#include <pango/pangocairo.h>
+
+#include <string>
+
+namespace content {
+
+void GetFontFamilies_SlowBlocking(std::vector<std::string>* font_families) {
+ 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);
+
+ for (int i = 0; i < num_families; i++)
+ font_families->push_back(::pango_font_family_get_name(families[i]));
+ g_free(families);
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698