aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/shape
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-02-08 13:06:56 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-08 19:36:49 +0000
commit0e07ad7fe7e95365eebde4e870792f0abb1d0890 (patch)
tree7e3631143f119817a159aa3e40928cedfec94a01 /tools/shape
parent4c790bd7dd8a6edacfc39b65b7043742331ab4da (diff)
ICU on windows
Change-Id: Ib1a2f017d96c5157c60d512332fddfef77c5ae8e Reviewed-on: https://skia-review.googlesource.com/103001 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tools/shape')
-rw-r--r--tools/shape/SkShaper_harfbuzz.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/shape/SkShaper_harfbuzz.cpp b/tools/shape/SkShaper_harfbuzz.cpp
index c5f437ea22..40414d9a79 100644
--- a/tools/shape/SkShaper_harfbuzz.cpp
+++ b/tools/shape/SkShaper_harfbuzz.cpp
@@ -15,6 +15,8 @@
#include <unicode/uscript.h>
#include "SkFontMgr.h"
+#include "SkLoadICU.h"
+#include "SkOnce.h"
#include "SkShaper.h"
#include "SkStream.h"
#include "SkTDPQueue.h"
@@ -448,6 +450,9 @@ struct SkShaper::Impl {
};
SkShaper::SkShaper(sk_sp<SkTypeface> tf) : fImpl(new Impl) {
+ SkOnce once;
+ once([] { SkLoadICU(); });
+
fImpl->fTypeface = tf ? std::move(tf) : SkTypeface::MakeDefault();
fImpl->fHarfBuzzFont = create_hb_font(fImpl->fTypeface.get());
SkASSERT(fImpl->fHarfBuzzFont);