halcanary | 8eccc30 | 2016-08-09 13:04:34 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | #ifndef SkPDFMakeToUnicodeCmap_DEFINED |
| 8 | #define SkPDFMakeToUnicodeCmap_DEFINED |
| 9 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 10 | #include "include/core/SkStream.h" |
| 11 | #include "src/pdf/SkPDFFont.h" |
halcanary | 8eccc30 | 2016-08-09 13:04:34 -0700 | [diff] [blame] | 12 | |
Hal Canary | 9a3f554 | 2018-12-10 19:59:07 -0500 | [diff] [blame] | 13 | std::unique_ptr<SkStreamAsset> SkPDFMakeToUnicodeCmap( |
Hal Canary | 46cc3da | 2018-05-09 11:50:34 -0400 | [diff] [blame] | 14 | const SkUnichar* glyphToUnicode, |
Hal Canary | 3135598 | 2018-10-19 12:21:41 -0400 | [diff] [blame] | 15 | const SkPDFGlyphUse* subset, |
halcanary | 8eccc30 | 2016-08-09 13:04:34 -0700 | [diff] [blame] | 16 | bool multiByteGlyphs, |
| 17 | SkGlyphID firstGlyphID, |
| 18 | SkGlyphID lastGlyphID); |
| 19 | |
| 20 | // Exposed for unit testing. |
Hal Canary | 46cc3da | 2018-05-09 11:50:34 -0400 | [diff] [blame] | 21 | void SkPDFAppendCmapSections(const SkUnichar* glyphToUnicode, |
Hal Canary | 3135598 | 2018-10-19 12:21:41 -0400 | [diff] [blame] | 22 | const SkPDFGlyphUse* subset, |
halcanary | 8eccc30 | 2016-08-09 13:04:34 -0700 | [diff] [blame] | 23 | SkDynamicMemoryWStream* cmap, |
| 24 | bool multiByteGlyphs, |
| 25 | SkGlyphID firstGlyphID, |
| 26 | SkGlyphID lastGlyphID); |
| 27 | |
| 28 | #endif // SkPDFMakeToUnicodeCmap_DEFINED |