diff options
author | 2015-12-03 12:12:13 -0800 | |
---|---|---|
committer | 2015-12-03 12:12:13 -0800 | |
commit | 2b1516fe35155e05331ca6d4f09be916dc1fd778 (patch) | |
tree | f9a37a1e3e4d8cea8c477b25b613dd4e90948c27 | |
parent | e2725f584095cd0a2cc5100fb6f1dc6a1740284e (diff) |
Update documentation for SkFontMgr methods.
The appropriate way to get the default system font is to pass |nullptr| as the
familyName. This was not clear from the interface, which may be why ui/gfx/ has
the wrong behavior.
BUG=chromium:564266
Review URL: https://codereview.chromium.org/1494253002
-rw-r--r-- | include/ports/SkFontMgr.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ports/SkFontMgr.h b/include/ports/SkFontMgr.h index 8d57986a13..96a8501c48 100644 --- a/include/ports/SkFontMgr.h +++ b/include/ports/SkFontMgr.h @@ -43,6 +43,8 @@ public: * The caller must call unref() on the returned object. * Never returns NULL; will return an empty set if the name is not found. * + * Passing |nullptr| as the parameter will return the default system font. + * * It is possible that this will return a style set not accessible from * createStyleSet(int) due to hidden or auto-activated fonts. */ @@ -54,6 +56,9 @@ public: * object. Will never return NULL, as it will return the default font if * no matching font is found. * + * Passing |nullptr| as the parameter for |familyName| will return the + * default system font. + * * It is possible that this will return a style set not accessible from * createStyleSet(int) or matchFamily(const char[]) due to hidden or * auto-activated fonts. @@ -68,6 +73,9 @@ public: * Will return NULL if no family can be found for the character * in the system fallback. * + * Passing |nullptr| as the parameter for |familyName| will return the + * default system font. + * * bcp47[0] is the least significant fallback, bcp47[bcp47Count-1] is the * most significant. If no specified bcp47 codes match, any font with the * requested character will be matched. |