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

Unified Diff: ui/gfx/font_fallback_android.h

Issue 2863693002: Fallback Font Cache and Character Hinting for VRShell (Closed)
Patch Set: using ICU script to increase cache hits Created 3 years, 7 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: ui/gfx/font_fallback_android.h
diff --git a/ui/gfx/font_fallback_android.h b/ui/gfx/font_fallback_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..86e01e88fcb37821ccf3d7539a54242edfab0575
--- /dev/null
+++ b/ui/gfx/font_fallback_android.h
@@ -0,0 +1,31 @@
+// Copyright 2017 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.
+
+#ifndef UI_GFX_FONT_FALLBACK_ANDROID_H_
+#define UI_GFX_FONT_FALLBACK_ANDROID_H_
+
+#include <string>
+
+#include "third_party/icu/source/common/unicode/uchar.h"
+#include "ui/gfx/font_fallback.h"
+#include "ui/gfx/gfx_export.h"
+
+namespace gfx {
+
+// Return a font name which provides a glyph for the Unicode code point
+// specified by character.
+// c: a UTF-32 code point
+// preferred_locale: preferred locale identifier (if any) for |c|
+// (e.g. "en", "ja", "zh-CN")
+//
+// Returns: the font name. The value is empty if the request could not be
+// satisfied or if the provided default font supports it.
+GFX_EXPORT std::string GetFallbackFontNameForChar(
+ const Font& font,
mthiesse 2017/05/08 14:46:35 nit: default_font? Also document this parameter ab
acondor_ 2017/05/08 16:55:29 Done.
+ UChar32 c,
+ const std::string& preferred_locale);
+
+} // namespace gfx
+
+#endif // UI_GFX_FONT_FALLBACK_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698