diff options
author | bungeman <bungeman@google.com> | 2017-05-01 13:02:42 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-01 18:13:02 +0000 |
commit | 7575bb1c389f96db4123783fcd717f3611b3a8eb (patch) | |
tree | ba76ce96b732117155b6fc48c644e9e29f50cd85 /include/ports | |
parent | fe560a8cc3839b7c4c0a63bdb286fe1e1f89a5dc (diff) |
SkFontMgr::matchFamily should not crash on nullptr.
While all systems can resolve a font from just a style request
(without a name) almost no systems specify a default font family.
BUG=skia:6574
Change-Id: If7c81808b62cd5d8212bce2eb4d9c476c45af80a
Reviewed-on: https://skia-review.googlesource.com/14902
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'include/ports')
-rw-r--r-- | include/ports/SkFontMgr.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ports/SkFontMgr.h b/include/ports/SkFontMgr.h index b5879d35b8..b13e113a2e 100644 --- a/include/ports/SkFontMgr.h +++ b/include/ports/SkFontMgr.h @@ -45,7 +45,9 @@ 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. + * Passing nullptr as the parameter will return the default system family. + * Note that most systems don't have a default system family, so passing nullptr will often + * result in the empty set. * * It is possible that this will return a style set not accessible from * createStyleSet(int) due to hidden or auto-activated fonts. |