aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-05-04 09:34:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-04 09:34:25 -0700
commit85e38bcf9e45f7fea962ab98f89d640b8ca98156 (patch)
tree2e9cdca9b476c3f5351746d520e53fed18e008f3 /tools
parent9ad5d7c84b553e46ce0563ed1162bdb6ee6bd5c3 (diff)
tools/using_skia_and_harfbuzz: minor cleanup
Diffstat (limited to 'tools')
-rw-r--r--tools/using_skia_and_harfbuzz.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/tools/using_skia_and_harfbuzz.cpp b/tools/using_skia_and_harfbuzz.cpp
index 8ed213c46c..413939d15b 100644
--- a/tools/using_skia_and_harfbuzz.cpp
+++ b/tools/using_skia_and_harfbuzz.cpp
@@ -5,24 +5,21 @@
* found in the LICENSE file.
*/
-#include "SkCanvas.h"
-#include "SkDocument.h"
-#include "SkFontMgr.h"
-#include "SkGradientShader.h"
-#include "SkPaint.h"
-#include "SkStream.h"
-#include "SkString.h"
-#include "SkTextBlob.h"
-#include "SkTypeface.h"
-
-#include <hb.h>
-#include <hb-ot.h>
+// This sample progam demonstrates how to use Skia and HarfBuzz to
+// produce a PDF file from UTF-8 text in stdin.
#include <cassert>
#include <iostream>
#include <map>
#include <string>
+#include <hb-ot.h>
+
+#include "SkCanvas.h"
+#include "SkDocument.h"
+#include "SkStream.h"
+#include "SkTextBlob.h"
+#include "SkTypeface.h"
struct BaseOption {
std::string selector;
@@ -207,7 +204,6 @@ class Placement {
SkPaint::kSubpixelText_Flag); // ... avoid waggly text when rotating.
glyph_paint.setColor(SK_ColorBLACK);
glyph_paint.setTextSize(config.font_size->value);
- SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
glyph_paint.setTypeface(face->fSkiaTypeface);
glyph_paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);