expose SkFont as public way to use TextBlobBuilder
Step 1 of many to (eventually) use SkFont to make blobs, and not paint.
Bug: skia:2664
Change-Id: Iaa0682f9d947e18afa96b448519f2f60ffe104cc
Reviewed-on: https://skia-review.googlesource.com/c/165521
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/tools/sk_tool_utils.h b/tools/sk_tool_utils.h
index 1d3072a..b3aae80 100644
--- a/tools/sk_tool_utils.h
+++ b/tools/sk_tool_utils.h
@@ -21,6 +21,7 @@
#include "SkStream.h"
#include "SkTArray.h"
#include "SkTDArray.h"
+#include "SkTypeface.h"
#include "SkTypes.h"
class SkBitmap;
@@ -73,6 +74,10 @@
*/
sk_sp<SkTypeface> create_portable_typeface(const char* name, SkFontStyle style);
+ static inline sk_sp<SkTypeface> create_portable_typeface() {
+ return create_portable_typeface(nullptr, SkFontStyle());
+ }
+
/**
* Call writePixels() by using the pixels from bitmap, but with an info that claims
* the pixels are colorType + alphaType