aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFMakeToUnicodeCmap.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-08-09 13:04:34 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-09 13:04:34 -0700
commit8eccc308c8adcdf26ffc7c4dd538b71f33c6f22b (patch)
treea05b3bfa26ccf05e733b0776a0e1fe788fad5528 /src/pdf/SkPDFMakeToUnicodeCmap.h
parent9bc1187249f27ffed448b49ad75fd226d8181241 (diff)
SkPDF: SkPDFFont organization changes.
SkPDFFont: - SkPDFType1Font::populate() encode advances correctly. - break out logically independent code into new files: * SkPDFConvertType1FontStream * SkPDFMakeToUnicodeCmap SkPDFFont.cpp is now 380 lines smaller. Expose `SkPDFAppendCmapSections()` for testing. SkPDFFontImpl.h - Fold into SkPDFFont. SkPDFConvertType1FontStream: - Now assume given a SkStreamAsset SkPDFFont: - AdvanceMetric now hidden in a anonymous namespace. No public API changes. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221163002 Review-Url: https://codereview.chromium.org/2221163002
Diffstat (limited to 'src/pdf/SkPDFMakeToUnicodeCmap.h')
-rw-r--r--src/pdf/SkPDFMakeToUnicodeCmap.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/pdf/SkPDFMakeToUnicodeCmap.h b/src/pdf/SkPDFMakeToUnicodeCmap.h
new file mode 100644
index 0000000000..1bd8930742
--- /dev/null
+++ b/src/pdf/SkPDFMakeToUnicodeCmap.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef SkPDFMakeToUnicodeCmap_DEFINED
+#define SkPDFMakeToUnicodeCmap_DEFINED
+
+#include "SkTDArray.h"
+#include "SkPDFFont.h"
+#include "SkStream.h"
+
+sk_sp<SkPDFStream> SkPDFMakeToUnicodeCmap(
+ const SkTDArray<SkUnichar>& glyphToUnicode,
+ const SkPDFGlyphSet* subset,
+ bool multiByteGlyphs,
+ SkGlyphID firstGlyphID,
+ SkGlyphID lastGlyphID);
+
+// Exposed for unit testing.
+void SkPDFAppendCmapSections(const SkTDArray<SkUnichar>& glyphToUnicode,
+ const SkPDFGlyphSet* subset,
+ SkDynamicMemoryWStream* cmap,
+ bool multiByteGlyphs,
+ SkGlyphID firstGlyphID,
+ SkGlyphID lastGlyphID);
+
+#endif // SkPDFMakeToUnicodeCmap_DEFINED