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

Unified Diff: ui/gfx/font.h

Issue 2441343003: Allow the default generic font family settings to find the first available font (Closed)
Patch Set: Code shared in ui/gfx Created 4 years, 2 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.h
diff --git a/ui/gfx/font.h b/ui/gfx/font.h
index e33bb680f6a690de88499a4483a3630a04220fd9..79b153e9cb46023b0f02c8dfe3318b14f6b17285 100644
--- a/ui/gfx/font.h
+++ b/ui/gfx/font.h
@@ -130,6 +130,12 @@ class GFX_EXPORT Font {
// static_cast to a known implementation type if needed.
PlatformFont* platform_font() const { return platform_font_.get(); }
+ // Returns the first available font name. If there is no available font,
+ // returns the first font name. Empty entries are ignored.
+ // Used by Blink and webui to pick the primary standard/serif/sans/fixed/etc.
+ // fonts from region-specific IDS lists.
+ static std::string FirstAvailableOrFirst(const std::string& font_name_list);
msw 2016/10/28 07:05:06 This probably shouldn't be a Font class member fun
kojii 2016/10/28 07:57:30 FontList makes perfect sense to me, I was actually
+
private:
// Wrapped platform font implementation.
scoped_refptr<PlatformFont> platform_font_;

Powered by Google App Engine
This is Rietveld 408576698